You are here

public function MerciLineItem::setPublished in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2

Sets the published status of a Merci Line Item.

Parameters

bool $published: TRUE to set this Merci Line Item to published, FALSE to set it to unpublished.

Return value

\Drupal\merci_line_item\Entity\MerciLineItemInterface The called Merci Line Item entity.

Overrides MerciLineItemInterface::setPublished

File

modules/merci_line_item/src/Entity/MerciLineItem.php, line 190

Class

MerciLineItem
Defines the Merci Line Item entity.

Namespace

Drupal\merci_line_item\Entity

Code

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