@@ -57,7 +57,7 @@ |
||
57 | 57 | |
58 | 58 | /** @var \Acquia\LightningExtension\Context\UtilityContext $utility */ |
59 | 59 | $utility = $this->getContext(UtilityContext::class); |
60 | - $utility->acceptAlerts(function () { |
|
60 | + $utility->acceptAlerts(function() { |
|
61 | 61 | $this->awaitAjax(); |
62 | 62 | }); |
63 | 63 | } |
@@ -181,11 +181,11 @@ |
||
181 | 181 | // Check if this field is an Address field. |
182 | 182 | if (isset($address['address_line1'])) { |
183 | 183 | // Format the address as a single string. |
184 | - $string .= $address['address_line1'] . "\n"; |
|
185 | - $string .= !empty($address['address_line2']) ? $address['address_line2'] . "\n" : ''; |
|
186 | - $string .= $address['locality'] . ', '; |
|
187 | - $string .= str_replace('US-', '', $address['administrative_area']) . ' '; |
|
188 | - $string .= $address['postal_code'] . "\n"; |
|
184 | + $string .= $address['address_line1']."\n"; |
|
185 | + $string .= !empty($address['address_line2']) ? $address['address_line2']."\n" : ''; |
|
186 | + $string .= $address['locality'].', '; |
|
187 | + $string .= str_replace('US-', '', $address['administrative_area']).' '; |
|
188 | + $string .= $address['postal_code']."\n"; |
|
189 | 189 | $string .= $address['country_code']; |
190 | 190 | } |
191 | 191 |
@@ -126,8 +126,7 @@ |
||
126 | 126 | $coordinates = $this->getSetting('show_coordinates'); |
127 | 127 | if ($coordinates) { |
128 | 128 | $summary[] = $this->t('Coordinates are shown'); |
129 | - } |
|
130 | - else { |
|
129 | + } else { |
|
131 | 130 | $summary[] = $this->t('Coordinates are hidden'); |
132 | 131 | } |
133 | 132 |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Acquia\DFExtension\Context; |
4 | 4 | |
5 | 5 | use Acquia\LightningExtension\AwaitTrait; |
6 | - |
|
7 | 6 | use Drupal\DrupalExtension\Context\DrupalSubContextBase; |
8 | 7 | |
9 | 8 | /** |
@@ -29,8 +29,7 @@ |
||
29 | 29 | function df_tools_media_views_insert(ViewEntityInterface $view) { |
30 | 30 | if (\Drupal::isConfigSyncing()) { |
31 | 31 | return; |
32 | - } |
|
33 | - elseif (drupal_installation_attempted() && $view->id() == 'media') { |
|
32 | + } elseif (drupal_installation_attempted() && $view->id() == 'media') { |
|
34 | 33 | $display1 = &$view->getDisplay('entity_browser_1'); |
35 | 34 | $display2 = &$view->getDisplay('entity_browser_2'); |
36 | 35 | $display1['display_options']['filters']['field_tags_target_id'] = $display2['display_options']['filters']['field_tags_target_id'] = [ |
@@ -19,7 +19,7 @@ |
||
19 | 19 | $image_names = explode(',', $images); |
20 | 20 | $files = []; |
21 | 21 | foreach ($image_names as $image_name) { |
22 | - $path = dirname($this->configuration['path']) . '/images/' . $image_name; |
|
22 | + $path = dirname($this->configuration['path']).'/images/'.$image_name; |
|
23 | 23 | $data = file_get_contents($path); |
24 | 24 | $uri = file_build_uri($image_name); |
25 | 25 | $files[] = file_save_data($data, $uri); |
@@ -11,14 +11,14 @@ |
||
11 | 11 | function df_tools_gallery_library_info_alter(&$libraries, $extension) { |
12 | 12 | // Optionally use the Libraries module to determine our library paths. |
13 | 13 | if ($extension == 'df_tools_gallery' && \Drupal::moduleHandler()->moduleExists('libraries')) { |
14 | - $imagesloaded_path = libraries_get_path('imagesloaded') . '/imagesloaded.pkgd.min.js'; |
|
15 | - $masonry_path = libraries_get_path('masonry') . '/dist/masonry.pkgd.min.js'; |
|
14 | + $imagesloaded_path = libraries_get_path('imagesloaded').'/imagesloaded.pkgd.min.js'; |
|
15 | + $masonry_path = libraries_get_path('masonry').'/dist/masonry.pkgd.min.js'; |
|
16 | 16 | $lightbox2_path = libraries_get_path('lightbox2'); |
17 | 17 | |
18 | - $libraries['lightbox2']['css']['theme'] = ['/' . $lightbox2_path . '/dist/css/lightbox.min.css' => []]; |
|
19 | - $libraries['lightbox2']['js'] = ['/' . $lightbox2_path . '/dist/js/lightbox.min.js' => ['minified' => 'true']]; |
|
20 | - $libraries['imagesloaded']['js'] = ['/' . $imagesloaded_path => ['minified' => 'true']]; |
|
21 | - $libraries['masonry']['js'] = ['/' . $masonry_path => ['minified' => 'true']]; |
|
18 | + $libraries['lightbox2']['css']['theme'] = ['/'.$lightbox2_path.'/dist/css/lightbox.min.css' => []]; |
|
19 | + $libraries['lightbox2']['js'] = ['/'.$lightbox2_path.'/dist/js/lightbox.min.js' => ['minified' => 'true']]; |
|
20 | + $libraries['imagesloaded']['js'] = ['/'.$imagesloaded_path => ['minified' => 'true']]; |
|
21 | + $libraries['masonry']['js'] = ['/'.$masonry_path => ['minified' => 'true']]; |
|
22 | 22 | } |
23 | 23 | } |
24 | 24 |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
6 | 6 | use Symfony\Component\EventDispatcher\Event; |
7 | -use Symfony\Component\HttpKernel\Event\KernelEvent; |
|
8 | 7 | use Symfony\Component\HttpKernel\KernelEvents; |
9 | 8 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
10 | 9 | use Drupal\Core\Cache\CacheTagsInvalidator; |
@@ -60,7 +60,7 @@ |
||
60 | 60 | if ($node = $event->getRequest()->get('node')) { |
61 | 61 | if (\Drupal::currentUser()->hasPermission('view latest version')) { |
62 | 62 | $theme = $this->themeManager->getActiveTheme()->getName(); |
63 | - $tag = 'config:block.block.' . $theme . '_local_actions'; |
|
63 | + $tag = 'config:block.block.'.$theme.'_local_actions'; |
|
64 | 64 | $this->cacheTagsInvalidator->invalidateTags([$tag]); |
65 | 65 | } |
66 | 66 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * {@inheritdoc} |
19 | 19 | */ |
20 | 20 | public static function getSubscribedEvents() { |
21 | - $events[RoutingEvents::ALTER] = ['onAlterRoutes',-9999]; // negative Values means "late" |
|
21 | + $events[RoutingEvents::ALTER] = ['onAlterRoutes', -9999]; // negative Values means "late" |
|
22 | 22 | return $events; |
23 | 23 | } |
24 | 24 |
@@ -68,8 +68,7 @@ discard block |
||
68 | 68 | if (isset($options['langcode'])) { |
69 | 69 | $url_options['language'] = \Drupal::languageManager()->getLanguage($options['langcode']); |
70 | 70 | $langcode = $options['langcode']; |
71 | - } |
|
72 | - else { |
|
71 | + } else { |
|
73 | 72 | $langcode = NULL; |
74 | 73 | } |
75 | 74 | |
@@ -93,8 +92,7 @@ discard block |
||
93 | 92 | $replacements[$original] = Url::fromRoute('entity.node.latest_version', [ |
94 | 93 | 'node' => $node->id(), |
95 | 94 | ], $url_options)->toString(); |
96 | - } |
|
97 | - else { |
|
95 | + } else { |
|
98 | 96 | $replacements[$original] = $latest->toUrl('canonical', $url_options)->toString(); |
99 | 97 | } |
100 | 98 | break; |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | if (!empty($settings)) { |
211 | 211 | // Use the Type Style color as the button's background color. |
212 | 212 | if (!empty($settings['color'])) { |
213 | - $build['actions']['quick_draft_form'][$id]['#attributes']['style'] = 'background-color: ' . $settings['color']; |
|
213 | + $build['actions']['quick_draft_form'][$id]['#attributes']['style'] = 'background-color: '.$settings['color']; |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | // Add the Type Style icon to the button. |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | '#type' => 'container', |
220 | 220 | $build['actions']['quick_draft_form'][$id], |
221 | 221 | [ |
222 | - '#markup' => '<i class="material-icons">' . $settings['icon'] . '</i>' |
|
222 | + '#markup' => '<i class="material-icons">'.$settings['icon'].'</i>' |
|
223 | 223 | ], |
224 | 224 | '#attributes' => [ |
225 | 225 | 'class' => ['moderation-sidebar-button-wrapper'], |