public function ConfigForm::buildForm in Disable user 1 edit 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 ConfigFormBase::buildForm
File
- src/
Form/ ConfigForm.php, line 34
Class
- ConfigForm
- Class ConfigForm.
Namespace
Drupal\disable_user_1_edit\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->configFactory
->get('disable_user_1_edit.settings');
$form['disabled'] = [
'#type' => 'checkbox',
'#default_value' => $config
->get('disabled'),
'#title' => $this
->t('Disable restriction'),
'#description' => $this
->t('Make user 1 editable again. That is to say: Disable disable user 1 edit.'),
];
return parent::buildForm($form, $form_state);
}