function FormHelperTest::providerElements
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Form/FormHelperTest.php \Drupal\Tests\Core\Form\FormHelperTest::providerElements()
- 8.9.x core/tests/Drupal/Tests/Core/Form/FormHelperTest.php \Drupal\Tests\Core\Form\FormHelperTest::providerElements()
- 11.x core/tests/Drupal/Tests/Core/Form/FormHelperTest.php \Drupal\Tests\Core\Form\FormHelperTest::providerElements()
Provides a list of elements to test.
File
-
core/
tests/ Drupal/ Tests/ Core/ Form/ FormHelperTest.php, line 102
Class
- FormHelperTest
- @coversDefaultClass \Drupal\Core\Form\FormHelper @group Form
Namespace
Drupal\Tests\Core\FormCode
public static function providerElements() {
return [
[
[
'#type' => 'date',
'#states' => [
'visible' => [
':input[name="toggle_me"]' => [
'checked' => TRUE,
],
],
],
],
'#attributes',
],
[
[
'#type' => 'item',
'#states' => [
'visible' => [
':input[name="foo"]' => [
'value' => 'bar',
],
],
],
'#markup' => '',
'#input' => TRUE,
],
'#wrapper_attributes',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.