public function Media::isPublished in Media entity 8
Returns the media published status indicator.
Unpublished media are only visible to their authors and to administrators.
Return value
bool TRUE if the media is published.
Overrides MediaInterface::isPublished
File
- src/
Entity/ Media.php, line 111
Class
- Media
- Defines the media entity class.
Namespace
Drupal\media_entity\EntityCode
public function isPublished() {
return (bool) $this
->get('status')->value;
}