You are here

public function SupportTicket::setOwner in Support Ticketing System 8

Sets the entity owner's user entity.

Parameters

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

Return value

$this

Overrides EntityOwnerInterface::setOwner

File

modules/support_ticket/src/Entity/SupportTicket.php, line 225
Contains \Drupal\support_ticket\Entity\SupportTicket.

Class

SupportTicket
Defines the support ticket entity class.

Namespace

Drupal\support_ticket\Entity

Code

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