function Contact::setOwner

Same name in other branches
  1. 3.x modules/content_entity_example/src/Entity/Contact.php \Drupal\content_entity_example\Entity\Contact::setOwner()
  2. 4.0.x modules/content_entity_example/src/Entity/Contact.php \Drupal\content_entity_example\Entity\Contact::setOwner()

File

content_entity_example/src/Entity/Contact.php, line 180

Class

Contact
Defines the ContentEntityExample entity.

Namespace

Drupal\content_entity_example\Entity

Code

public function setOwner(UserInterface $account) {
    $this->set('user_id', $account->id());
    return $this;
}