Completed
Push — 8.x-1.x ( 610588...77e186 )
by Janez
03:43
created
src/Plugin/EntityBrowser/SelectionDisplay/View.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     // them only once. Reason for that is how SQL and Views work and we probably
53 53
     // can't do much about it.
54 54
     if (!empty($this->selectedEntities)) {
55
-      $ids = array_map(function(EntityInterface $item) {return $item->id();}, $this->selectedEntities);
55
+      $ids = array_map(function(EntityInterface $item) {return $item->id(); }, $this->selectedEntities);
56 56
       $storage['selection_display_view']->setArguments([implode(',', $ids)]);
57 57
     }
58 58
 
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
     // Get all views displays.
86 86
     $views = Views::getAllViews();
87 87
     foreach ($views as $view_id => $view) {
88
-      foreach ($view->get('display') as $display_id => $display)  {
89
-        $options[$view_id . '.' . $display_id] = $this->t('@view : @display', array('@view' => $view->label(), '@display' => $display['display_title']));
88
+      foreach ($view->get('display') as $display_id => $display) {
89
+        $options[$view_id.'.'.$display_id] = $this->t('@view : @display', array('@view' => $view->label(), '@display' => $display['display_title']));
90 90
       }
91 91
     }
92 92
 
93 93
     $form['view'] = [
94 94
       '#type' => 'select',
95 95
       '#title' => $this->t('View : View display'),
96
-      '#default_value' => $this->configuration['view'] . '.' . $this->configuration['view_display'],
96
+      '#default_value' => $this->configuration['view'].'.'.$this->configuration['view_display'],
97 97
       '#options' => $options,
98 98
       '#required' => TRUE,
99 99
       '#description' => 'View display to use for displaying currently selected items. Do note that to get something usefull out of this display, its first contextual filter should be a filter on the primary identifier field of your entity type (e.g., Node ID, Media ID).',
Please login to merge, or discard this patch.