public function FlagListItem::setPublished in Flag Lists 4.0.x
Same name and namespace in other branches
- 8 src/Entity/FlagListItem.php \Drupal\flag_lists\Entity\FlagListItem::setPublished()
Sets the published status of a Flag list item.
Parameters
bool $published: TRUE to set this Flag list item to published, FALSE to set it to unpublished.
Return value
\Drupal\flag_lists\Entity\FlagListItemInterface The called Flag list item entity.
Overrides FlagListItemInterface::setPublished
File
- src/
Entity/ FlagListItem.php, line 146
Class
- FlagListItem
- Defines the Flag list item entity.
Namespace
Drupal\flag_lists\EntityCode
public function setPublished($published) {
$this
->set('status', $published ? TRUE : FALSE);
return $this;
}