You are here

public function Schedule::setOwner in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/Entity/Schedule.php \Drupal\business_rules\Entity\Schedule::setOwner()

Sets the entity owner's user entity.

Parameters

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

Return value

$this

Overrides EntityOwnerInterface::setOwner

File

src/Entity/Schedule.php, line 182

Class

Schedule
Defines the Schedule entity.

Namespace

Drupal\business_rules\Entity

Code

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