function public function SettingBase::alterForm

8.x-3.x SettingBase.php public SettingBase::alterForm(array &$form, FormStateInterface $form_state, $form_id = NULL)

The alter method to store the code.

Parameters

array $form: Nested array of form elements that comprises the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

string $form_id: String representing the name of the form itself. Typically this is the name of the function that generated the form.

Overrides FormInterface::alterForm

Class

SettingBase
Base class for a setting.

Namespace

Drupal\bootstrap\Plugin\Setting

Source src/Plugin/Setting/SettingBase.php (line 36)

public function alterForm(array &$form, FormStateInterface $form_state, $form_id = NULL) {
  $this->alterFormElement(Element::create($form, $form_state), $form_state);
}