Move NodeInterface::PUBLISHED and NodeInterface::NOT_PUBLISHED constants to EntityPublishedInterface

Created on 25 February 2020, over 5 years ago
Updated 30 May 2025, about 2 months ago

As their names suggest those constants should belong to EntityPublishedInterface. Basically any entity type that implements EntityPublishedInterface needs those constants.

Another issue here is that EntityPublishedTrait::isPublished() does not respect those constants. That could be fixed like follows.

- return (bool) $this->getEntityKey('published');
+ return $this->getEntityKey('published') === self::PUBLISHED;
πŸ“Œ Task
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component

entity system

Created by

πŸ‡·πŸ‡ΊRussia Chi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024