You are here

public function UnpublishSupportTicket::execute in Support Ticketing System 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

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

Class

UnpublishSupportTicket
Unpublishes a support ticket.

Namespace

Drupal\support_ticket\Plugin\Action

Code

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