You are here

public function SimpleMegaMenu::setPublished in Simple Mega Menu 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/SimpleMegaMenu.php \Drupal\simple_megamenu\Entity\SimpleMegaMenu::setPublished()

Sets the published status of a Simple mega menu.

Parameters

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

Return value

\Drupal\simple_megamenu\Entity\SimpleMegaMenuInterface The called Simple mega menu entity.

Overrides SimpleMegaMenuInterface::setPublished

File

src/Entity/SimpleMegaMenu.php, line 192

Class

SimpleMegaMenu
Defines the Simple mega menu entity.

Namespace

Drupal\simple_megamenu\Entity

Code

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