/** * Entity builder updating the support_ticket status with the submitted value. * * @param string $entity_type_id * The entity type identifier. * @param \Drupal\support_ticket\SupportTicketInterface $support_ticket * The support_ticket updated with the submitted values. * @param array $form * The complete form array. * @param \Drupal\Core\Form\FormStateInterface $form_state * The current state of the form. * * @see \Drupal\support_ticket\SupportTicketForm::form() */ 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']); } }