function TextFormatElementFormTest::buildForm
Same name in other branches
- 9 core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::buildForm()
- 10 core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::buildForm()
- 11.x core/modules/filter/tests/src/Kernel/TextFormatElementFormTest.php \Drupal\Tests\filter\Kernel\TextFormatElementFormTest::buildForm()
Overrides FormInterface::buildForm
File
-
core/
modules/ filter/ tests/ src/ Kernel/ TextFormatElementFormTest.php, line 82
Class
- TextFormatElementFormTest
- Tests PathElement validation and conversion functionality.
Namespace
Drupal\Tests\filter\KernelCode
public function buildForm(array $form, FormStateInterface $form_state) {
// A textformat field.
$form['textformat'] = [
'#type' => 'text_format',
'#required' => TRUE,
'#title' => 'Text',
'#base_type' => 'textfield',
'#format' => NULL,
'#default_value' => 'test value',
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.