Skip to content

Commit b1be81b

Browse files
committed
Issue #2903322 by gaurav.kapoor, levmyshkin: Change FAPI Container example class to an array
(cherry picked from commit dcf633a)
1 parent f3b830d commit b1be81b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

lib/Drupal/Core/Render/Element/Container.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,27 @@
1818
*
1919
* Usage example:
2020
* @code
21-
* $form['needs_accommodation'] = array(
21+
* $form['needs_accommodation'] = [
2222
* '#type' => 'checkbox',
2323
* '#title' => $this->t('Need Special Accommodations?'),
24-
* );
24+
* ];
2525
*
26-
* $form['accommodation'] = array(
26+
* $form['accommodation'] = [
2727
* '#type' => 'container',
28-
* '#attributes' => array(
29-
* 'class' => 'accommodation',
30-
* ),
31-
* '#states' => array(
32-
* 'invisible' => array(
33-
* 'input[name="needs_accommodation"]' => array('checked' => FALSE),
34-
* ),
35-
* ),
36-
* );
28+
* '#attributes' => [
29+
* 'class' => ['accommodation'],
30+
* ],
31+
* '#states' => [
32+
* 'invisible' => [
33+
* 'input[name="needs_accommodation"]' => ['checked' => FALSE],
34+
* ],
35+
* ],
36+
* ];
3737
*
38-
* $form['accommodation']['diet'] = array(
38+
* $form['accommodation']['diet'] = [
3939
* '#type' => 'textfield',
4040
* '#title' => $this->t('Dietary Restrictions'),
41-
* );
41+
* ];
4242
* @endcode
4343
*
4444
* @RenderElement("container")

0 commit comments

Comments
 (0)