public function SettingsForm::buildForm in Simplifying 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- src/
Form/ SettingsForm.php, line 80
Class
Namespace
Drupal\simplifying\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form_id = 'simplifying_settings_form_wrapper';
$form['#prefix'] = '<div id="' . $form_id . '">';
$form['#suffix'] = '</div>';
$form['tabs'] = [
'#type' => 'vertical_tabs',
];
$this->toolbar
->formFields($form, $form_state);
$this->entityfields
->formFields($form, $form_state);
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Save'),
];
return $form;
}