interface EntityPublishedInterface
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/EntityPublishedInterface.php \Drupal\Core\Entity\EntityPublishedInterface
- 10 core/lib/Drupal/Core/Entity/EntityPublishedInterface.php \Drupal\Core\Entity\EntityPublishedInterface
- 8.9.x core/lib/Drupal/Core/Entity/EntityPublishedInterface.php \Drupal\Core\Entity\EntityPublishedInterface
Provides an interface for access to an entity's published state.
Hierarchy
- interface \Drupal\Core\Access\AccessibleInterface; interface \Drupal\Core\Cache\CacheableDependencyInterface; interface \Drupal\Core\Cache\RefinableCacheableDependencyInterface extends \Drupal\Core\Cache\CacheableDependencyInterface
- interface \Drupal\Core\Entity\EntityInterface extends \Drupal\Core\Access\AccessibleInterface, \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Cache\RefinableCacheableDependencyInterface
- interface \Drupal\Core\Entity\EntityPublishedInterface extends \Drupal\Core\Entity\EntityInterface
- interface \Drupal\Core\Entity\EntityInterface extends \Drupal\Core\Access\AccessibleInterface, \Drupal\Core\Cache\CacheableDependencyInterface, \Drupal\Core\Cache\RefinableCacheableDependencyInterface
Expanded class hierarchy of EntityPublishedInterface
All classes that implement EntityPublishedInterface
Related topics
24 files declare their use of EntityPublishedInterface
- BlockContentInterface.php in core/
modules/ block_content/ src/ BlockContentInterface.php - CommentInterface.php in core/
modules/ comment/ src/ CommentInterface.php - CommonCollectionFilterAccessTestPatternsTrait.php in core/
modules/ jsonapi/ tests/ src/ Traits/ CommonCollectionFilterAccessTestPatternsTrait.php - ContentModeration.php in core/
modules/ content_moderation/ src/ Plugin/ WorkflowType/ ContentModeration.php - ContentModerationStateTest.php in core/
modules/ content_moderation/ tests/ src/ Kernel/ ContentModerationStateTest.php
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityPublishedInterface.php, line 10
Namespace
Drupal\Core\EntityView source
interface EntityPublishedInterface extends EntityInterface {
/**
* Returns whether or not the entity is published.
*
* @return bool
* TRUE if the entity is published, FALSE otherwise.
*/
public function isPublished();
/**
* Sets the entity as published.
*
* @return $this
*
* @see \Drupal\Core\Entity\EntityPublishedInterface::setUnpublished()
*/
public function setPublished();
/**
* Sets the entity as unpublished.
*
* @return $this
*/
public function setUnpublished();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.