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