You are here

public function Event::isPublished in Event 8

Returns whether or not the entity is published.

Return value

bool TRUE if the entity is published, FALSE otherwise.

Overrides EntityPublishedInterface::isPublished

File

src/Entity/Event.php, line 211

Class

Event
Defines the Event entity.

Namespace

Drupal\event\Entity

Code

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