public function EckEntity::isPublished in Entity Construction Kit (ECK) 8
Returns whether or not the entity is published.
Return value
bool TRUE if the entity is published, FALSE otherwise.
Overrides EntityPublishedTrait::isPublished
File
- src/
Entity/ EckEntity.php, line 70
Class
- EckEntity
- Defines the ECK entity.
Namespace
Drupal\eck\EntityCode
public function isPublished() {
$key = $this
->getEntityType()
->getKey('published');
return (bool) $this
->hasField($key) ? $this
->get($key)->value : TRUE;
}