You are here

public function AssignOwnerSupportTicket::execute in Support Ticketing System 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

modules/support_ticket/src/Plugin/Action/AssignOwnerSupportTicket.php, line 66
Contains \Drupal\support_ticket\Plugin\Action\AssignOwnerSupportTicket.

Class

AssignOwnerSupportTicket
Assigns ownership of a support ticket to a user.

Namespace

Drupal\support_ticket\Plugin\Action

Code

public function execute($entity = NULL) {

  /** @var \Drupal\support_ticket\SupportTicketInterface $entity */
  $entity
    ->setOwnerId($this->configuration['owner_uid'])
    ->save();
}