You are here

public function OpignoActivity::setPublished in Opigno module 8

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

Sets the published status of a Activity.

Parameters

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

Return value

\Drupal\opigno_module\Entity\OpignoActivityInterface The called Activity entity.

Overrides OpignoActivityInterface::setPublished

File

src/Entity/OpignoActivity.php, line 194

Class

OpignoActivity
Defines the Activity entity.

Namespace

Drupal\opigno_module\Entity

Code

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