You are here

public function FlaggingCollection::setPublished in Flag Lists 4.0.x

Same name and namespace in other branches
  1. 8 src/Entity/FlaggingCollection.php \Drupal\flag_lists\Entity\FlaggingCollection::setPublished()

Sets the published status of a Flagging collection.

Parameters

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

Return value

\Drupal\flag_lists\Entity\FlaggingCollectionInterface The called Flagging collection entity.

Overrides FlaggingCollectionInterface::setPublished

File

src/Entity/FlaggingCollection.php, line 306

Class

FlaggingCollection
Defines the Flagging collection entity.

Namespace

Drupal\flag_lists\Entity

Code

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