@@ -15,7 +15,6 @@ |
||
| 15 | 15 | use Drupal\Core\Plugin\ContainerFactoryPluginInterface; |
| 16 | 16 | use Drupal\Core\Url; |
| 17 | 17 | use Drupal\Core\Validation\Plugin\Validation\Constraint\NotNullConstraint; |
| 18 | -use Drupal\entity_browser\EntityCollection; |
|
| 19 | 18 | use Drupal\entity_browser\FieldWidgetDisplayManager; |
| 20 | 19 | use Symfony\Component\DependencyInjection\ContainerInterface; |
| 21 | 20 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
@@ -144,14 +144,14 @@ discard block |
||
| 144 | 144 | '#theme_wrappers' => ['container'], |
| 145 | 145 | 'path' => [ |
| 146 | 146 | '#type' => 'hidden', |
| 147 | - '#value' => Url::fromRoute('entity_browser.' . $this->configuration['entity_browser_id'], [], $data['query_parameters'])->toString(), |
|
| 147 | + '#value' => Url::fromRoute('entity_browser.'.$this->configuration['entity_browser_id'], [], $data['query_parameters'])->toString(), |
|
| 148 | 148 | ], |
| 149 | 149 | 'open_modal' => [ |
| 150 | 150 | '#type' => 'submit', |
| 151 | 151 | '#value' => $this->configuration['link_text'], |
| 152 | 152 | '#limit_validation_errors' => [], |
| 153 | 153 | '#submit' => [], |
| 154 | - '#name' => Html::getId('op_' . $this->configuration['entity_browser_id'] . '_' . $this->getUuid()), |
|
| 154 | + '#name' => Html::getId('op_'.$this->configuration['entity_browser_id'].'_'.$this->getUuid()), |
|
| 155 | 155 | '#ajax' => [ |
| 156 | 156 | 'callback' => [$this, 'openModal'], |
| 157 | 157 | 'event' => 'click', |
@@ -206,13 +206,13 @@ discard block |
||
| 206 | 206 | 'height' => $this->configuration['height'] - 90, |
| 207 | 207 | 'frameborder' => 0, |
| 208 | 208 | 'style' => 'padding:0', |
| 209 | - 'name' => 'entity_browser_iframe_' . Html::cleanCssIdentifier($element_name), |
|
| 209 | + 'name' => 'entity_browser_iframe_'.Html::cleanCssIdentifier($element_name), |
|
| 210 | 210 | ], |
| 211 | 211 | ]; |
| 212 | 212 | $html = drupal_render($content); |
| 213 | 213 | |
| 214 | 214 | $response = new AjaxResponse(); |
| 215 | - $response->addCommand(new OpenDialogCommand('#' . Html::getUniqueId($field_name . '-' . $element_name . '-dialog'), $this->configuration['link_text'], $html, [ |
|
| 215 | + $response->addCommand(new OpenDialogCommand('#'.Html::getUniqueId($field_name.'-'.$element_name.'-dialog'), $this->configuration['link_text'], $html, [ |
|
| 216 | 216 | 'width' => 'auto', |
| 217 | 217 | 'height' => 'auto', |
| 218 | 218 | 'modal' => TRUE, |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | public function propagateSelection(FilterResponseEvent $event) { |
| 311 | 311 | $render = [ |
| 312 | 312 | 'labels' => [ |
| 313 | - '#markup' => 'Labels: ' . implode(', ', array_map(function (EntityInterface $item) { |
|
| 313 | + '#markup' => 'Labels: '.implode(', ', array_map(function(EntityInterface $item) { |
|
| 314 | 314 | return $item->label(); |
| 315 | 315 | }, $this->entities)), |
| 316 | 316 | '#attached' => [ |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | 'drupalSettings' => [ |
| 319 | 319 | 'entity_browser' => [ |
| 320 | 320 | 'modal' => [ |
| 321 | - 'entities' => array_map(function (EntityInterface $item) { |
|
| 321 | + 'entities' => array_map(function(EntityInterface $item) { |
|
| 322 | 322 | return [$item->id(), $item->uuid(), $item->getEntityTypeId()]; |
| 323 | 323 | }, $this->entities), |
| 324 | 324 | 'uuid' => $this->request->query->get('uuid'), |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | * {@inheritdoc} |
| 337 | 337 | */ |
| 338 | 338 | public function path() { |
| 339 | - return '/entity-browser/modal/' . $this->configuration['entity_browser_id']; |
|
| 339 | + return '/entity-browser/modal/'.$this->configuration['entity_browser_id']; |
|
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | /** |