You are here

public function ConsentAgreement::setPublished in General Data Protection Regulation 8.2

Same name and namespace in other branches
  1. 8 modules/gdpr_consent/src/Entity/ConsentAgreement.php \Drupal\gdpr_consent\Entity\ConsentAgreement::setPublished()
  2. 3.0.x modules/gdpr_consent/src/Entity/ConsentAgreement.php \Drupal\gdpr_consent\Entity\ConsentAgreement::setPublished()

Sets the published status of a Consent Agreement.

Parameters

bool $published: TRUE to set this Consent Agreement to published, FALSE to unpublished.

Return value

\Drupal\gdpr_consent\Entity\ConsentAgreementInterface The called Consent Agreement entity.

Overrides ConsentAgreementInterface::setPublished

File

modules/gdpr_consent/src/Entity/ConsentAgreement.php, line 205

Class

ConsentAgreement
Defines the ConsentAgreement entity.

Namespace

Drupal\gdpr_consent\Entity

Code

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