Form constructor.
array $form: An associative array containing the structure of the form.
array $form_state: An associative array containing the current state of the form.
array The form structure.
Overrides FormInterface::buildForm
public function buildForm(array $form, array &$form_state) {
// During the initial form build, add this controller to the form state and
// allow for initial preparation before form building and processing.
if (!isset($form_state['controller'])) {
$this
->init($form_state);
}
// Retrieve the form array using the possibly updated entity in form state.
$form = $this
->form($form, $form_state);
// Retrieve and add the form actions array.
$actions = $this
->actionsElement($form, $form_state);
if (!empty($actions)) {
$form['actions'] = $actions;
}
return $form;
}