You are here

public function EasyEmail::setCreator in Easy Email 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/EasyEmail.php \Drupal\easy_email\Entity\EasyEmail::setCreator()

Sets the entity creator's user entity.

Parameters

\Drupal\user\UserInterface $account: The creator user entity.

Return value

$this

Overrides EasyEmailInterface::setCreator

File

src/Entity/EasyEmail.php, line 199

Class

EasyEmail
Defines the Email entity.

Namespace

Drupal\easy_email\Entity

Code

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