public function Heartbeat::setPublished in Heartbeat 8
Sets the published status of a Heartbeat.
Parameters
bool $published: TRUE to set this Heartbeat to published, FALSE to set it to unpublished.
Return value
\Drupal\heartbeat\Entity\HeartbeatInterface The called Heartbeat entity.
Overrides HeartbeatInterface::setPublished
File
- src/
Entity/ Heartbeat.php, line 238
Class
Namespace
Drupal\heartbeat\EntityCode
public function setPublished($published) {
$this
->set('status', $published ? TRUE : FALSE);
return $this;
}