Skip to content
Snippets Groups Projects
Unverified Commit 5525420f authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2903322 by gaurav.kapoor, levmyshkin: Change FAPI Container example class to an array

(cherry picked from commit dcf633a9)
parent 2ef7968c
No related branches found
No related tags found
No related merge requests found
......@@ -18,27 +18,27 @@
*
* Usage example:
* @code
* $form['needs_accommodation'] = array(
* $form['needs_accommodation'] = [
* '#type' => 'checkbox',
* '#title' => $this->t('Need Special Accommodations?'),
* );
* ];
*
* $form['accommodation'] = array(
* $form['accommodation'] = [
* '#type' => 'container',
* '#attributes' => array(
* 'class' => 'accommodation',
* ),
* '#states' => array(
* 'invisible' => array(
* 'input[name="needs_accommodation"]' => array('checked' => FALSE),
* ),
* ),
* );
* '#attributes' => [
* 'class' => ['accommodation'],
* ],
* '#states' => [
* 'invisible' => [
* 'input[name="needs_accommodation"]' => ['checked' => FALSE],
* ],
* ],
* ];
*
* $form['accommodation']['diet'] = array(
* $form['accommodation']['diet'] = [
* '#type' => 'textfield',
* '#title' => $this->t('Dietary Restrictions'),
* );
* ];
* @endcode
*
* @RenderElement("container")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment