You are here

function JobItemForm::ajaxReviewForm in Translation Management Tool 8

Ajax callback for the job item review form.

File

src/Form/JobItemForm.php, line 565

Class

JobItemForm
Form controller for the job item edit forms.

Namespace

Drupal\tmgmt\Form

Code

function ajaxReviewForm(array $form, FormStateInterface $form_state) {
  $key = array_slice($form_state
    ->getTriggeringElement()['#array_parents'], 0, 2);
  $render_data = NestedArray::getValue($form, $key);
  tmgmt_write_request_messages($form_state
    ->getFormObject()
    ->getEntity());
  return $render_data;
}