You are here

function support_ticket_get_type_label in Support Ticketing System 8

Returns the support ticket type label for the passed support ticket.

Parameters

\Drupal\support_ticket\SupportTicketInterface $support_ticket: A support ticket entity to return the support ticket type's label for.

Return value

string|false The support ticket type label or FALSE if the support ticket type is not found.

5 calls to support_ticket_get_type_label()
SupportTicketForm::form in modules/support_ticket/src/SupportTicketForm.php
Gets the actual form array to be built.
SupportTicketForm::save in modules/support_ticket/src/SupportTicketForm.php
Form submission handler for the 'save' action.
SupportTicketListBuilder::buildRow in modules/support_ticket/src/SupportTicketListBuilder.php
Builds a row for an entity in the entity listing.
SupportTicketRevisionRevertForm::submitForm in modules/support_ticket/src/Form/SupportTicketRevisionRevertForm.php
Form submission handler.
support_ticket_tokens in modules/support_ticket/support_ticket.tokens.inc
Implements hook_tokens().

File

modules/support_ticket/support_ticket.module, line 129
Enables use of support tickets with optional time tracking.

Code

function support_ticket_get_type_label(SupportTicketInterface $support_ticket) {
  $type = SupportTicketType::load($support_ticket
    ->bundle());
  return $type ? $type
    ->label() : FALSE;
}