@@ -284,7 +284,7 @@ |
||
284 | 284 | } |
285 | 285 | else if ($referenced_entity instanceof MediaInterface) { |
286 | 286 | if ($depth < self::DEPTH_LIMIT && $file = $this->getFileFromEntity($referenced_entity)) { |
287 | - $return = $file; |
|
287 | + $return = $file; |
|
288 | 288 | } |
289 | 289 | } |
290 | 290 | } |
@@ -132,8 +132,7 @@ discard block |
||
132 | 132 | if ($this->getSetting('image_link')) { |
133 | 133 | $summary[] = $this->t('Thumbnail is linked to entity'); |
134 | 134 | } |
135 | - } |
|
136 | - else { |
|
135 | + } else { |
|
137 | 136 | $summary[] = $this->t('Please select a responsive image style.'); |
138 | 137 | } |
139 | 138 | |
@@ -227,8 +226,7 @@ discard block |
||
227 | 226 | if ($file = $this->getFileFromEntity($block_content)) { |
228 | 227 | return $file; |
229 | 228 | } |
230 | - } |
|
231 | - else if ($block instanceof EntityField) { |
|
229 | + } else if ($block instanceof EntityField) { |
|
232 | 230 | list (, $field_name) = explode(':', $block->getDerivativeId()); |
233 | 231 | if ($entity->hasField($field_name) && $field = $entity->get($field_name)) { |
234 | 232 | if ($file = $this->getFileFromField($field)) { |
@@ -281,8 +279,7 @@ discard block |
||
281 | 279 | $referenced_entity = reset($referenced_entities); |
282 | 280 | if ($referenced_entity instanceof FileInterface) { |
283 | 281 | $return = $referenced_entity; |
284 | - } |
|
285 | - else if ($referenced_entity instanceof MediaInterface) { |
|
282 | + } else if ($referenced_entity instanceof MediaInterface) { |
|
286 | 283 | if ($depth < self::DEPTH_LIMIT && $file = $this->getFileFromEntity($referenced_entity)) { |
287 | 284 | $return = $file; |
288 | 285 | } |
@@ -139,7 +139,7 @@ |
||
139 | 139 | $selection['table'][$mid] = [ |
140 | 140 | '#attributes' => [ |
141 | 141 | 'class' => ['draggable'], |
142 | - 'data-entity-id' => $media->getEntityTypeId() . ':' . $mid, |
|
142 | + 'data-entity-id' => $media->getEntityTypeId().':'.$mid, |
|
143 | 143 | ], |
144 | 144 | 'title' => ['#markup' => $media->label()], |
145 | 145 | 'type' => ['#markup' => $bundle_info[$media->bundle()]['label']], |
@@ -206,8 +206,7 @@ discard block |
||
206 | 206 | if ($media && $media->access('view')) { |
207 | 207 | if (isset(static::$recursiveRenderDepth[$mid])) { |
208 | 208 | static::$recursiveRenderDepth[$mid]++; |
209 | - } |
|
210 | - else { |
|
209 | + } else { |
|
211 | 210 | static::$recursiveRenderDepth[$mid] = 1; |
212 | 211 | } |
213 | 212 | |
@@ -236,8 +235,7 @@ discard block |
||
236 | 235 | $mids = \Drupal::entityQuery('media') |
237 | 236 | ->condition('uuid', $this->configuration['uuids'], 'IN') |
238 | 237 | ->execute(); |
239 | - } |
|
240 | - else { |
|
238 | + } else { |
|
241 | 239 | $mids = []; |
242 | 240 | } |
243 | 241 |
@@ -53,8 +53,7 @@ |
||
53 | 53 | foreach ($arguments as $argument) { |
54 | 54 | if ($argument{0} == '-') { |
55 | 55 | $task->rawArg($argument); |
56 | - } |
|
57 | - else { |
|
56 | + } else { |
|
58 | 57 | $feature = "tests/features/$argument"; |
59 | 58 | |
60 | 59 | if (file_exists("$feature.feature")) { |
@@ -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 |
@@ -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 |
@@ -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 |