You are here

function SupportTicketForm::updateStatus in Support Ticketing System 8

Entity builder updating the support_ticket status with the submitted value.

Parameters

string $entity_type_id: The entity type identifier.

\Drupal\support_ticket\SupportTicketInterface $support_ticket: The support_ticket updated with the submitted values.

array $form: The complete form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

See also

\Drupal\support_ticket\SupportTicketForm::form()

File

modules/support_ticket/src/SupportTicketForm.php, line 221
Contains \Drupal\support_ticket\SupportTicketForm.

Class

SupportTicketForm
Form controller for the support ticket edit forms.

Namespace

Drupal\support_ticket

Code

function updateStatus($entity_type_id, SupportTicketInterface $support_ticket, array $form, FormStateInterface $form_state) {
  $element = $form_state
    ->getTriggeringElement();
  if (isset($element['#published_status'])) {
    $support_ticket
      ->setPublished($element['#published_status']);
  }
}