You are here

public function PublishSupportTicket::execute in Support Ticketing System 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

modules/support_ticket/src/Plugin/Action/PublishSupportTicket.php, line 27
Contains \Drupal\support_ticket\Plugin\Action\PublishSupportTicket.

Class

PublishSupportTicket
Publishes a support ticket.

Namespace

Drupal\support_ticket\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity->status = SUPPORT_TICKET_PUBLISHED;
  $entity
    ->save();
}