public function UserConsent::setPublished in Data Policy 8
Sets the published status of a User consent.
Parameters
bool $published: TRUE to set this User consent to published, FALSE to set it to unpublished.
Return value
\Drupal\data_policy\Entity\UserConsentInterface The called User consent entity.
Overrides UserConsentInterface::setPublished
File
- src/
Entity/ UserConsent.php, line 116
Class
- UserConsent
- Defines the User consent entity.
Namespace
Drupal\data_policy\EntityCode
public function setPublished($published) {
$this
->set('status', $published);
return $this;
}