1. 8.5.x core/lib/Drupal/Core/Entity/EntityPublishedInterface.php EntityPublishedInterface
  2. 8.3.x core/lib/Drupal/Core/Entity/EntityPublishedInterface.php EntityPublishedInterface
  3. 8.4.x core/lib/Drupal/Core/Entity/EntityPublishedInterface.php EntityPublishedInterface
  4. 8.6.x core/lib/Drupal/Core/Entity/EntityPublishedInterface.php EntityPublishedInterface

Provides an interface for access to an entity's published state.


Expanded class hierarchy of EntityPublishedInterface

All classes that implement EntityPublishedInterface

7 files declare their use of EntityPublishedInterface
CommentInterface.php in core/modules/comment/src/CommentInterface.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
EntityTestMulRevPub.php in core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevPub.php
ModerationHandler.php in core/modules/content_moderation/src/Entity/Handler/ModerationHandler.php

... See full list


core/lib/Drupal/Core/Entity/EntityPublishedInterface.php, line 8


View source
interface EntityPublishedInterface {

   * 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.
   * @param bool|null $published
   *   (optional and deprecated) TRUE to set this entity to published, FALSE to
   *   set it to unpublished. Defaults to NULL. This parameter is deprecated in
   *   Drupal 8.3.0 and will be removed before Drupal 9.0.0. Use this method,
   *   without any parameter, to set the entity as published and
   *   setUnpublished() to set the entity as unpublished.
   * @return $this
   * @see \Drupal\Core\Entity\EntityPublishedInterface::setUnpublished()
  public function setPublished($published = NULL);

   * Sets the entity as unpublished.
   * @return $this
  public function setUnpublished();



Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
EntityPublishedInterface::isPublished public function Returns whether or not the entity is published.
EntityPublishedInterface::setPublished public function Sets the entity as published.
EntityPublishedInterface::setUnpublished public function Sets the entity as unpublished.