You are here

public function UserModuleStatus::setPublished in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Entity/UserModuleStatus.php \Drupal\opigno_module\Entity\UserModuleStatus::setPublished()

Sets the published status of a User module status.

Parameters

bool $published: TRUE to set this User module status to published, FALSE to set it to unpublished.

Return value

\Drupal\opigno_module\Entity\UserModuleStatusInterface The called User module status entity.

Overrides UserModuleStatusInterface::setPublished

File

src/Entity/UserModuleStatus.php, line 138

Class

UserModuleStatus
Defines the User module status entity.

Namespace

Drupal\opigno_module\Entity

Code

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