public function ConsentAgreement::setOwner in General Data Protection Regulation 8
Same name and namespace in other branches
- 8.2 modules/gdpr_consent/src/Entity/ConsentAgreement.php \Drupal\gdpr_consent\Entity\ConsentAgreement::setOwner()
- 3.0.x modules/gdpr_consent/src/Entity/ConsentAgreement.php \Drupal\gdpr_consent\Entity\ConsentAgreement::setOwner()
Sets the entity owner's user entity.
Parameters
\Drupal\user\UserInterface $account: The owner user entity.
Return value
$this
Overrides EntityOwnerInterface::setOwner
File
- modules/
gdpr_consent/ src/ Entity/ ConsentAgreement.php, line 183
Class
- ConsentAgreement
- Defines the ConsentAgreement entity.
Namespace
Drupal\gdpr_consent\EntityCode
public function setOwner(UserInterface $account) {
$this
->set('user_id', $account
->id());
return $this;
}