You are here

public function BrightcoveVideoPlaylistCmsEntity::setPublished in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/Entity/BrightcoveVideoPlaylistCmsEntity.php \Drupal\brightcove\Entity\BrightcoveVideoPlaylistCmsEntity::setPublished()
  2. 3.x src/Entity/BrightcoveVideoPlaylistCmsEntity.php \Drupal\brightcove\Entity\BrightcoveVideoPlaylistCmsEntity::setPublished()

Sets the published status of the entity.

Parameters

bool $published: TRUE to set this entity to published, FALSE to set it to unpublished.

Return value

\Drupal\brightcove\BrightcoveVideoPlaylistCMSEntityInterface The called Brightcove Video or Playlist.

Overrides BrightcoveVideoPlaylistCMSEntityInterface::setPublished

File

src/Entity/BrightcoveVideoPlaylistCmsEntity.php, line 79

Class

BrightcoveVideoPlaylistCmsEntity
Common base class for CMS entities like Video and Playlist.

Namespace

Drupal\brightcove\Entity

Code

public function setPublished($published) {
  return $this
    ->set('status', $published ? NODE_PUBLISHED : NODE_NOT_PUBLISHED);
}