You are here

public function CustomMetaSettingsForm::buildForm in Custom Meta 2.0.x

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/CustomMetaSettingsForm.php, line 30

Class

CustomMetaSettingsForm
Defines the custom meta settings form.

Namespace

Drupal\custom_meta\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['custom_meta_prefix'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Custom meta tags prefix'),
    '#description' => $this
      ->t('Use this to define the prefix of the custom meta tags '),
    '#default_value' => $this
      ->config('custom_meta.settings')
      ->get('prefix') ?? '',
  ];
  return parent::buildForm($form, $form_state);
}