Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / entity_browser / src / Plugin / EntityBrowser / WidgetSelector / Tabs.php
index b0c1f606aafa63a3d3ddfa379663b6429fc783ad..e6d511d446fb9b869157c838942c97eea63e9299 100644 (file)
@@ -19,22 +19,22 @@ class Tabs extends WidgetSelectorBase {
   /**
    * {@inheritdoc}
    */
-  public function getForm(array &$form = array(), FormStateInterface &$form_state = NULL) {
+  public function getForm(array &$form = [], FormStateInterface &$form_state = NULL) {
     $element = [];
     foreach ($this->widget_ids as $id => $label) {
       $name = 'tab_selector_' . $id;
-      $element[$name] = array(
+      $element[$name] = [
         '#type' => 'button',
         '#attributes' => ['class' => ['tab']],
         '#value' => $label,
         '#disabled' => $id == $this->getDefaultWidget(),
         '#executes_submit_callback' => TRUE,
-        '#limit_validation_errors' => array(array($id)),
+        '#limit_validation_errors' => [[$id]],
         // #limit_validation_errors only takes effect if #submit is present.
-        '#submit' => array(),
+        '#submit' => [],
         '#name' => $name,
         '#widget_id' => $id,
-      );
+      ];
     }
 
     $element['#attached']['library'][] = 'entity_browser/tabs';