public function FlippingBook::setPublished in Flipping Book 8
Sets the published status of a Flipping Book.
Parameters
bool $published: TRUE to set this Flipping Book to published, FALSE to set it to unpublished.
Return value
\Drupal\flipping_book\Entity\FlippingBookInterface The called Flipping Book entity.
Overrides FlippingBookInterface::setPublished
File
- src/
Entity/ FlippingBook.php, line 171
Class
- FlippingBook
- Defines the Flipping Book entity.
Namespace
Drupal\flipping_book\EntityCode
public function setPublished($published) {
$this
->set('status', $published ? NODE_PUBLISHED : NODE_NOT_PUBLISHED);
return $this;
}