You are here

public function SupportTicketController::add in Support Ticketing System 8

Provides the support ticket submission form.

Parameters

\Drupal\support_ticket\SupportTicketTypeInterface $support_ticket_type: The support ticket type entity for the support ticket.

Return value

array A support ticket submission form.

1 string reference to 'SupportTicketController::add'
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 113
Contains \Drupal\support_ticket\Controller\SupportTicketController.

Class

SupportTicketController
Returns responses for Support Ticket routes.

Namespace

Drupal\support_ticket\Controller

Code

public function add(SupportTicketTypeInterface $support_ticket_type) {
  $support_ticket = $this
    ->entityManager()
    ->getStorage('support_ticket')
    ->create(array(
    'support_ticket_type' => $support_ticket_type
      ->id(),
  ));
  $form = $this
    ->entityFormBuilder()
    ->getForm($support_ticket);
  return $form;
}