Completed
Push — 8.x-1.x ( 370b51...8c1944 )
by Janez
02:17
created
src/Permissions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
     foreach ($browsers as $browser) {
65 65
       if ($browser->route()) {
66
-        $permissions['access ' . $browser->id() . ' entity browser pages'] = array(
66
+        $permissions['access '.$browser->id().' entity browser pages'] = array(
67 67
           'title' => $this->translationManager->translate('Access @name pages', array('@name' => $browser->label())),
68 68
           'description' => $this->translationManager->translate('Access pages that %browser uses to operate.', array('%browser' => $browser->label())),
69 69
         );
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/WidgetSelector/DropDown.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
   /**
25 25
    * {@inheritdoc}
26 26
    */
27
-  public function getForm(array &$form = array(), FormStateInterface &$form_state = NULL) {
27
+  public function getForm(array &$form = array(), FormStateInterface&$form_state = NULL) {
28 28
     // Set a wrapper container for us to replace the form on ajax call.
29 29
     $form['#prefix'] = '<div id="entity-browser-form">';
30 30
     $form['#suffix'] = '</div>';
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/WidgetSelector/Single.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
   /**
25 25
    * {@inheritdoc}
26 26
    */
27
-  public function getForm(array &$form, FormStateInterface &$form_state) {
27
+  public function getForm(array &$form, FormStateInterface&$form_state) {
28 28
     return array();
29 29
   }
30 30
 
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/WidgetSelector/Tabs.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@
 block discarded – undo
24 24
   /**
25 25
    * {@inheritdoc}
26 26
    */
27
-  public function getForm(array &$form = array(), FormStateInterface &$form_state = NULL) {
27
+  public function getForm(array &$form = array(), FormStateInterface&$form_state = NULL) {
28 28
     $element = [];
29 29
     foreach ($this->widget_ids as $id => $label) {
30
-      $name = 'tab_selector_' . $id;
30
+      $name = 'tab_selector_'.$id;
31 31
       $element[$name] = array(
32 32
         '#type' => 'button',
33 33
         '#attributes' => ['class' => ['tab']],
Please login to merge, or discard this patch.
src/RouteSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
       /** @var $browser \Drupal\entity_browser\EntityBrowserInterface */
63 63
       $browser = $this->browserStorage->load($id);
64 64
       if ($route = $browser->route()) {
65
-        $collection->add('entity_browser.' . $browser->id(), $route);
65
+        $collection->add('entity_browser.'.$browser->id(), $route);
66 66
       }
67 67
     }
68 68
 
Please login to merge, or discard this patch.
src/WidgetSelectorInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
    * @return array
31 31
    *   Form structure.
32 32
    */
33
-  public function getForm(array &$form, FormStateInterface &$form_state);
33
+  public function getForm(array &$form, FormStateInterface&$form_state);
34 34
 
35 35
   /**
36 36
    * Sets the default widget.
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/Widget/Upload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
       $files = $this->prepareEntities($form, $form_state);
126 126
       array_walk(
127 127
         $files,
128
-        function (FileInterface $file) {
128
+        function(FileInterface $file) {
129 129
           $file->setPermanent();
130 130
           $file->save();
131 131
         }
Please login to merge, or discard this patch.
src/Controllers/EntityBrowserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@
 block discarded – undo
43 43
       // Return the form as a modal dialog.
44 44
       $form['#attached']['library'][] = 'core/drupal.dialog.ajax';
45 45
       $title = $this->t('Edit entity @entity', ['@entity' => $entity->label()]);
46
-      $response = AjaxResponse::create()->addCommand(new OpenDialogCommand('#' . $entity->getEntityTypeId() . '-' . $entity->id() . '-edit-dialog', $title, $form, ['modal' => TRUE, 'width' => 800]));
46
+      $response = AjaxResponse::create()->addCommand(new OpenDialogCommand('#'.$entity->getEntityTypeId().'-'.$entity->id().'-edit-dialog', $title, $form, ['modal' => TRUE, 'width' => 800]));
47 47
       return $response;
48 48
     }
49 49
     else {
50 50
       // Return command for closing the modal.
51
-      $response = AjaxResponse::create()->addCommand(new CloseDialogCommand('#' . $entity->getEntityTypeId() . '-' . $entity->id() . '-edit-dialog'));
51
+      $response = AjaxResponse::create()->addCommand(new CloseDialogCommand('#'.$entity->getEntityTypeId().'-'.$entity->id().'-edit-dialog'));
52 52
       // Also refresh the widget if "details_id" is provided.
53 53
       $details_id = $request->query->get('details_id');
54 54
       if (!empty($details_id)) {
Please login to merge, or discard this patch.
src/Plugin/EntityBrowser/SelectionDisplay/View.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     // can't do much about it.
51 51
     $selected_entities = $form_state->get(['entity_browser', 'selected_entities']);
52 52
     if (!empty($selected_entities)) {
53
-      $ids = array_map(function (EntityInterface $item) {
53
+      $ids = array_map(function(EntityInterface $item) {
54 54
         return $item->id();
55 55
       }, $selected_entities);
56 56
       $storage['selection_display_view']->setArguments([implode(',', $ids)]);
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
     $views = Views::getAllViews();
87 87
     foreach ($views as $view_id => $view) {
88 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']));
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' => $this->t('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.