You are here

public function SupportTicketController::revisionShow in Support Ticketing System 8

Displays a support_ticket revision.

Parameters

int $supprt_ticket_revision: The support ticket revision ID.

Return value

array An array suitable for drupal_render().

1 string reference to 'SupportTicketController::revisionShow'
support_ticket.routing.yml in modules/support_ticket/support_ticket.routing.yml
modules/support_ticket/support_ticket.routing.yml

File

modules/support_ticket/src/Controller/SupportTicketController.php, line 132
Contains \Drupal\support_ticket\Controller\SupportTicketController.

Class

SupportTicketController
Returns responses for Support Ticket routes.

Namespace

Drupal\support_ticket\Controller

Code

public function revisionShow($support_ticket_revision) {
  $support_ticket = $this
    ->entityManager()
    ->getStorage('support_ticket')
    ->loadRevision($support_ticket_revision);
  $support_ticket_view_controller = new SupportTicketViewController($this->entityManager, $this->renderer);
  $page = $support_ticket_view_controller
    ->view($support_ticket);
  unset($page['support_tickets'][$support_ticket
    ->id()]['#cache']);
  return $page;
}