You are here

public function DataPolicy::setPublished in Data Policy 8

Sets the published status of a Data policy.

Parameters

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

Return value

\Drupal\data_policy\Entity\DataPolicyInterface The called Data policy entity.

Overrides DataPolicyInterface::setPublished

File

src/Entity/DataPolicy.php, line 170

Class

DataPolicy
Defines the Data policy entity.

Namespace

Drupal\data_policy\Entity

Code

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