@@ -24,7 +24,7 @@ |
||
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>'; |
@@ -24,7 +24,7 @@ |
||
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 |
@@ -24,10 +24,10 @@ |
||
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']], |
@@ -62,7 +62,7 @@ |
||
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 |
@@ -30,7 +30,7 @@ |
||
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. |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | // info. |
135 | 135 | $event_object = new RegisterJSCallbacks($this->configuration['entity_browser_id'], $uuid); |
136 | 136 | $event_object->registerCallback('Drupal.entityBrowser.selectionCompleted'); |
137 | - $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, $event_object ); |
|
137 | + $event = $this->eventDispatcher->dispatch(Events::REGISTER_JS_CALLBACKS, $event_object); |
|
138 | 138 | $original_path = $this->currentPath->getPath(); |
139 | 139 | return [ |
140 | 140 | '#theme_wrappers' => ['container'], |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'entity_browser' => [ |
155 | 155 | 'iframe' => [ |
156 | 156 | $uuid => [ |
157 | - 'src' => Url::fromRoute('entity_browser.' . $this->configuration['entity_browser_id'], [], [ |
|
157 | + 'src' => Url::fromRoute('entity_browser.'.$this->configuration['entity_browser_id'], [], [ |
|
158 | 158 | 'query' => [ |
159 | 159 | 'uuid' => $uuid, |
160 | 160 | 'original_path' => $original_path, |
@@ -192,13 +192,13 @@ discard block |
||
192 | 192 | public function propagateSelection(FilterResponseEvent $event) { |
193 | 193 | $render = [ |
194 | 194 | 'labels' => [ |
195 | - '#markup' => 'Labels: ' . implode(', ', array_map(function (EntityInterface $item) {return $item->label();}, $this->entities)), |
|
195 | + '#markup' => 'Labels: '.implode(', ', array_map(function(EntityInterface $item) {return $item->label(); }, $this->entities)), |
|
196 | 196 | '#attached' => [ |
197 | 197 | 'library' => ['entity_browser/iframe_selection'], |
198 | 198 | 'drupalSettings' => [ |
199 | 199 | 'entity_browser' => [ |
200 | 200 | 'iframe' => [ |
201 | - 'entities' => array_map(function (EntityInterface $item) {return [$item->id(), $item->uuid(), $item->getEntityTypeId()];}, $this->entities), |
|
201 | + 'entities' => array_map(function(EntityInterface $item) {return [$item->id(), $item->uuid(), $item->getEntityTypeId()]; }, $this->entities), |
|
202 | 202 | 'uuid' => $this->request->query->get('uuid'), |
203 | 203 | ], |
204 | 204 | ], |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * {@inheritdoc} |
225 | 225 | */ |
226 | 226 | public function path() { |
227 | - return '/entity-browser/iframe/' . $this->configuration['entity_browser_id']; |
|
227 | + return '/entity-browser/iframe/'.$this->configuration['entity_browser_id']; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | } |