You are here

public function HeartbeatStream::setPublished in Heartbeat 8

Sets the published status of a Heartbeat stream.

Parameters

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

Return value

\Drupal\heartbeat\Entity\HeartbeatStreamInterface The called Heartbeat stream entity.

Overrides HeartbeatStreamInterface::setPublished

File

src/Entity/HeartbeatStream.php, line 297

Class

HeartbeatStream
Defines the Heartbeat stream entity.

Namespace

Drupal\heartbeat\Entity

Code

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