public function OpignoModule::setPublished in Opigno module 8
Same name and namespace in other branches
- 3.x src/Entity/OpignoModule.php \Drupal\opigno_module\Entity\OpignoModule::setPublished()
Sets the published status of a Module.
Parameters
bool $published: TRUE to set this Module to published, FALSE to set it to unpublished.
Return value
\Drupal\opigno_module\Entity\OpignoModuleInterface The called Module entity.
Overrides OpignoModuleInterface::setPublished
File
- src/
Entity/ OpignoModule.php, line 176
Class
- OpignoModule
- Defines the Module entity.
Namespace
Drupal\opigno_module\EntityCode
public function setPublished($published) {
$this
->set('status', $published ? TRUE : FALSE);
return $this;
}