@@ -16,11 +16,11 @@ |
||
| 16 | 16 | |
| 17 | 17 | public function prepareRow(Row $row) { |
| 18 | 18 | if ($image = $row->getSourceProperty('Picture')) { |
| 19 | - $base_path = dirname($this->configuration['path']) . '/images/'; |
|
| 19 | + $base_path = dirname($this->configuration['path']).'/images/'; |
|
| 20 | 20 | |
| 21 | 21 | // Setup our source/destination paths. |
| 22 | - $path = $base_path . $image; |
|
| 23 | - $destination_path = 'public://' . $image; |
|
| 22 | + $path = $base_path.$image; |
|
| 23 | + $destination_path = 'public://'.$image; |
|
| 24 | 24 | |
| 25 | 25 | // Copy the file. |
| 26 | 26 | file_unmanaged_copy($path, $destination_path, FILE_EXISTS_REPLACE); |
@@ -20,19 +20,19 @@ |
||
| 20 | 20 | 'render element' => 'content', |
| 21 | 21 | 'base hook' => 'node', |
| 22 | 22 | 'template' => 'node--cta', |
| 23 | - 'path' => drupal_get_path('module', 'df_tools_cta') . '/templates', |
|
| 23 | + 'path' => drupal_get_path('module', 'df_tools_cta').'/templates', |
|
| 24 | 24 | ); |
| 25 | 25 | $theme['node__cta__callout'] = array( |
| 26 | 26 | 'render element' => 'content', |
| 27 | 27 | 'base hook' => 'node', |
| 28 | 28 | 'template' => 'node--cta--callout', |
| 29 | - 'path' => drupal_get_path('module', 'df_tools_cta') . '/templates', |
|
| 29 | + 'path' => drupal_get_path('module', 'df_tools_cta').'/templates', |
|
| 30 | 30 | ); |
| 31 | 31 | $theme['node__cta__notification'] = array( |
| 32 | 32 | 'render element' => 'content', |
| 33 | 33 | 'base hook' => 'node', |
| 34 | 34 | 'template' => 'node--cta--notification', |
| 35 | - 'path' => drupal_get_path('module', 'df_tools_cta') . '/templates', |
|
| 35 | + 'path' => drupal_get_path('module', 'df_tools_cta').'/templates', |
|
| 36 | 36 | ); |
| 37 | 37 | return $theme; |
| 38 | 38 | } |
@@ -20,8 +20,8 @@ |
||
| 20 | 20 | ->getStorage('file')->loadByProperties(['filename' => $image]); |
| 21 | 21 | |
| 22 | 22 | if (empty($files)) { |
| 23 | - $base_path = dirname($this->configuration['path']) . '/images/'; |
|
| 24 | - $path = $base_path . $image; |
|
| 23 | + $base_path = dirname($this->configuration['path']).'/images/'; |
|
| 24 | + $path = $base_path.$image; |
|
| 25 | 25 | $data = file_get_contents($path); |
| 26 | 26 | $uri = file_build_uri($image); |
| 27 | 27 | $file = file_save_data($data, $uri); |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | else { |
| 45 | 45 | foreach ($value as $j) { |
| 46 | - $output[] = $this->keysToString($keys) . '[] = ' . $j; |
|
| 46 | + $output[] = $this->keysToString($keys).'[] = '.$j; |
|
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | else { |
| 51 | - $output[] = $this->keysToString($keys) . ' = ' . $value; |
|
| 51 | + $output[] = $this->keysToString($keys).' = '.$value; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | array_pop($keys); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | protected function keysToString(array $keys) { |
| 70 | 70 | $head = array_shift($keys); |
| 71 | 71 | if ($keys) { |
| 72 | - return $head . '[' . implode('][', $keys) . ']'; |
|
| 72 | + return $head.'['.implode('][', $keys).']'; |
|
| 73 | 73 | } |
| 74 | 74 | else { |
| 75 | 75 | return $head; |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | foreach (['key', 'value1', 'value2', 'value3'] as $var) { |
| 124 | 124 | $$var = isset($match[++$i]) ? $match[$i] : ''; |
| 125 | 125 | } |
| 126 | - $value = stripslashes(substr($value1, 1, -1)) . stripslashes(substr($value2, 1, -1)) . $value3; |
|
| 126 | + $value = stripslashes(substr($value1, 1, -1)).stripslashes(substr($value2, 1, -1)).$value3; |
|
| 127 | 127 | |
| 128 | 128 | // Parse array syntax. |
| 129 | 129 | $keys = preg_split('/\]?\[/', rtrim($key, ']')); |
@@ -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']], |
@@ -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 | |
@@ -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 | } |