function IncorrectConfigTargetForm::buildForm

Same name and namespace in other branches
  1. 10 core/modules/system/tests/modules/form_test/src/Form/IncorrectConfigTargetForm.php \Drupal\form_test\Form\IncorrectConfigTargetForm::buildForm()

Overrides ConfigFormBase::buildForm

File

core/modules/system/tests/modules/form_test/src/Form/IncorrectConfigTargetForm.php, line 32

Class

IncorrectConfigTargetForm
A form for configuring preferences with AJAX updates.

Namespace

Drupal\form_test\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['missing_key'] = [
    '#type' => 'textfield',
    '#title' => $this->t('Missing key'),
    '#config_target' => 'form_test.object:does_not_exist',
  ];
  return parent::buildForm($form, $form_state);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.