You are here

public function SimpleForm::buildForm in Admin CSS 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/SimpleForm.php, line 78

Class

SimpleForm
SimpleForm with some custom functions and settings.

Namespace

Drupal\admin_css\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['custom_css'] = [
    '#type' => 'textarea',
    '#title' => $this
      ->t('Enter your custom css'),
    '#default_value' => $this
      ->config('admin_css.settings')
      ->get('custom_css'),
    '#rows' => 10,
  ];
  return parent::buildForm($form, $form_state);
}