You are here

public function EntityPublishedTrait::isPublished in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EntityPublishedTrait.php \Drupal\Core\Entity\EntityPublishedTrait::isPublished()
  2. 9 core/lib/Drupal/Core/Entity/EntityPublishedTrait.php \Drupal\Core\Entity\EntityPublishedTrait::isPublished()

File

core/lib/Drupal/Core/Entity/EntityPublishedTrait.php, line 47

Class

EntityPublishedTrait
Provides a trait for published status.

Namespace

Drupal\Core\Entity

Code

public function isPublished() {
  return (bool) $this
    ->getEntityKey('published');
}