$form_state->
setTriggeringElement($buttons[0
]);
} $triggering_element =
$form_state->
getTriggeringElement();
// If the triggering element specifies "button-level" validation and
// submit handlers to run instead of the default form-level ones, then add
// those to the form state.
if (isset($triggering_element['#validate'
])) { $form_state->
setValidateHandlers($triggering_element['#validate'
]);
} if (isset($triggering_element['#submit'
])) { $form_state->
setSubmitHandlers($triggering_element['#submit'
]);
} // If the triggering element executes submit handlers, then set the form
// state key that's needed for those handlers to run.
if (!
empty($triggering_element['#executes_submit_callback'
])) { $form_state->
setSubmitted();
} // Special processing if the triggering element is a button.
if (!
empty($triggering_element['#is_button'
])) { // Because there are several ways in which the triggering element could