From dcf633a96cb3aeaf096fc99bc44cf0db01e43675 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Fri, 22 Feb 2019 08:23:51 +0000 Subject: [PATCH] Issue #2903322 by gaurav.kapoor, levmyshkin: Change FAPI Container example class to an array --- .../Drupal/Core/Render/Element/Container.php | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/core/lib/Drupal/Core/Render/Element/Container.php b/core/lib/Drupal/Core/Render/Element/Container.php index 357e6a548496..0708546dee65 100644 --- a/core/lib/Drupal/Core/Render/Element/Container.php +++ b/core/lib/Drupal/Core/Render/Element/Container.php @@ -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") -- GitLab