@@ -139,13 +139,13 @@ discard block |
||
139 | 139 | // info. |
140 | 140 | $event_object = new RegisterJSCallbacks($this->configuration['entity_browser_id'], $uuid); |
141 | 141 | $event_object->registerCallback('Drupal.entityBrowser.selectionCompleted'); |
142 | - $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, $event_object ); |
|
142 | + $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, $event_object); |
|
143 | 143 | $original_path = $this->currentPath->getPath(); |
144 | 144 | return [ |
145 | 145 | '#theme_wrappers' => ['container'], |
146 | 146 | 'path' => [ |
147 | 147 | '#type' => 'hidden', |
148 | - '#value' => Url::fromRoute('entity_browser.' . $this->configuration['entity_browser_id'], [], [ |
|
148 | + '#value' => Url::fromRoute('entity_browser.'.$this->configuration['entity_browser_id'], [], [ |
|
149 | 149 | 'query' => [ |
150 | 150 | 'uuid' => $uuid, |
151 | 151 | 'original_path' => $original_path, |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | '#value' => $this->configuration['link_text'], |
158 | 158 | '#limit_validation_errors' => [], |
159 | 159 | '#submit' => [], |
160 | - '#name' => 'op_' . $this->configuration['entity_browser_id'], |
|
160 | + '#name' => 'op_'.$this->configuration['entity_browser_id'], |
|
161 | 161 | '#ajax' => [ |
162 | 162 | 'callback' => [$this, 'openModal'], |
163 | 163 | 'event' => 'click', |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | 'data-uuid' => $uuid, |
167 | 167 | ], |
168 | 168 | '#attached' => [ |
169 | - 'library' => ['core/drupal.dialog.ajax', 'entity_browser/modal'], |
|
169 | + 'library' => ['core/drupal.dialog.ajax', 'entity_browser/modal'], |
|
170 | 170 | 'drupalSettings' => [ |
171 | 171 | 'entity_browser' => [ |
172 | 172 | 'modal' => [ |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | 'height' => $this->configuration['height'] - 90, |
212 | 212 | 'frameborder' => 0, |
213 | 213 | 'style' => 'padding:', |
214 | - 'name' => Html::cleanCssIdentifier('entity-browser-iframe-' . $this->configuration['entity_browser_id']) |
|
214 | + 'name' => Html::cleanCssIdentifier('entity-browser-iframe-'.$this->configuration['entity_browser_id']) |
|
215 | 215 | ], |
216 | 216 | ]; |
217 | 217 | $html = drupal_render($content); |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | * An array of ajax commands. |
288 | 288 | */ |
289 | 289 | public function getAjaxCommands(FormStateInterface $form_state) { |
290 | - $entities = array_map(function(EntityInterface $item) {return [$item->id(), $item->uuid(), $item->getEntityTypeId()];}, $form_state->get(['entity_browser', 'selected_entities'])); |
|
290 | + $entities = array_map(function(EntityInterface $item) {return [$item->id(), $item->uuid(), $item->getEntityTypeId()]; }, $form_state->get(['entity_browser', 'selected_entities'])); |
|
291 | 291 | |
292 | 292 | $commands = array(); |
293 | 293 | $commands[] = new SelectEntitiesCommand($this->uuid, $entities); |
@@ -307,13 +307,13 @@ discard block |
||
307 | 307 | public function propagateSelection(FilterResponseEvent $event) { |
308 | 308 | $render = [ |
309 | 309 | 'labels' => [ |
310 | - '#markup' => 'Labels: ' . implode(', ', array_map(function (EntityInterface $item) {return $item->label();}, $this->entities)), |
|
310 | + '#markup' => 'Labels: '.implode(', ', array_map(function(EntityInterface $item) {return $item->label(); }, $this->entities)), |
|
311 | 311 | '#attached' => [ |
312 | 312 | 'library' => ['entity_browser/modal_selection'], |
313 | 313 | 'drupalSettings' => [ |
314 | 314 | 'entity_browser' => [ |
315 | 315 | 'modal' => [ |
316 | - 'entities' => array_map(function (EntityInterface $item) {return [$item->id(), $item->uuid(), $item->getEntityTypeId()];}, $this->entities), |
|
316 | + 'entities' => array_map(function(EntityInterface $item) {return [$item->id(), $item->uuid(), $item->getEntityTypeId()]; }, $this->entities), |
|
317 | 317 | 'uuid' => $this->request->query->get('uuid'), |
318 | 318 | ], |
319 | 319 | ], |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | * {@inheritdoc} |
330 | 330 | */ |
331 | 331 | public function path() { |
332 | - return '/entity-browser/modal/' . $this->configuration['entity_browser_id']; |
|
332 | + return '/entity-browser/modal/'.$this->configuration['entity_browser_id']; |
|
333 | 333 | } |
334 | 334 | |
335 | 335 | /** |