@@ -6,6 +6,6 @@ |
||
6 | 6 | function df_tools_frontend_library_info_alter(&$libraries, $extension) { |
7 | 7 | if ($extension == 'image') { |
8 | 8 | $path = drupal_get_path('module', 'df_tools_frontend'); |
9 | - $libraries['quickedit.inPlaceEditor.image']['js']['/' . $path . '/js/quickedit_image_browser.js'] = []; |
|
9 | + $libraries['quickedit.inPlaceEditor.image']['js']['/'.$path.'/js/quickedit_image_browser.js'] = []; |
|
10 | 10 | } |
11 | 11 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | if ($migration != null) { |
49 | 49 | $definition = $migration->getPluginDefinition(); |
50 | 50 | $dump = Yaml::dump($definition); |
51 | - $file_url = $destination . $migration->id() . '.yml'; |
|
51 | + $file_url = $destination.$migration->id().'.yml'; |
|
52 | 52 | $message = t('Export migration @name?', ['@name' => $name]); |
53 | 53 | if (drush_confirm($message) && $data = file_save_data($dump, $file_url)) { |
54 | 54 | drush_print(t('File saved: @file', ['@file' => $data->getFileUri()])); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | protected function setImageProperty(Row $row, $source_property) { |
35 | 35 | if ($value = $row->getSourceProperty($source_property)) { |
36 | - $path = dirname($this->configuration['path']) . '/images/' . $value; |
|
36 | + $path = dirname($this->configuration['path']).'/images/'.$value; |
|
37 | 37 | $data = file_get_contents($path); |
38 | 38 | $uri = file_build_uri($value); |
39 | 39 | $file = file_save_data($data, $uri); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | // Point source path to local CSV file. |
37 | 37 | if ($local_csv === TRUE) { |
38 | - $migration['source']['path'] = $path . $prefix . "." . $entity_type . "." . $type . '.csv'; |
|
38 | + $migration['source']['path'] = $path.$prefix.".".$entity_type.".".$type.'.csv'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // Set content type to current bundle. |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | // Reset the library path to work around a bug with the Libraries module not |
24 | 24 | // incorporating the ['path'] when calling libraries_get_path(). |
25 | - $libraries['lite']['library path'] = libraries_get_path('lite') . '/' . $libraries['lite']['path']; |
|
25 | + $libraries['lite']['library path'] = libraries_get_path('lite').'/'.$libraries['lite']['path']; |
|
26 | 26 | |
27 | 27 | // Hardcode the version number because the raw source files do not contain |
28 | 28 | // any version information. |
@@ -76,13 +76,13 @@ discard block |
||
76 | 76 | } |
77 | 77 | try { |
78 | 78 | $module_info = \Drupal::moduleHandler()->getModule($input); |
79 | - $destination_dir = DRUPAL_ROOT . '/' . $module_info->getPath() . '/config/install/'; |
|
80 | - $source = DRUPAL_ROOT . '/' . $destination_storage->getFilePath($config); |
|
79 | + $destination_dir = DRUPAL_ROOT.'/'.$module_info->getPath().'/config/install/'; |
|
80 | + $source = DRUPAL_ROOT.'/'.$destination_storage->getFilePath($config); |
|
81 | 81 | // Create /config/install directory if it does not exist. |
82 | 82 | if (!file_exists($destination_dir)) { |
83 | 83 | mkdir($destination_dir, 0755, true); |
84 | 84 | } |
85 | - $destination = $destination_dir . basename($source); |
|
85 | + $destination = $destination_dir.basename($source); |
|
86 | 86 | if (!copy($source, $destination)) { |
87 | 87 | drush_log(dt('New copy from @source to @destination failed.', ['@source' => $source, '@destination' => $destination]), LogLevel::ERROR); |
88 | 88 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | break; |
99 | 99 | case 'update': |
100 | 100 | foreach ($list as $config) { |
101 | - $source = DRUPAL_ROOT . '/' . $destination_storage->getFilePath($config); |
|
101 | + $source = DRUPAL_ROOT.'/'.$destination_storage->getFilePath($config); |
|
102 | 102 | |
103 | 103 | $instances = _df_tools_config_find_config_instances($destination_storage, $config); |
104 | 104 | $choice = drush_choice($instances, dt('Choose update destination for @config.', ['@config' => $config])); |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | |
153 | 153 | $iterator = new RecursiveDirectoryIterator(DRUPAL_ROOT, FilesystemIterator::FOLLOW_SYMLINKS); |
154 | 154 | $files = []; |
155 | - foreach(new RecursiveIteratorIterator($iterator) as $file){ |
|
156 | - if(strpos($file, $filename) !== FALSE && strpos($file, DRUPAL_ROOT . '/sites/') === FALSE){ |
|
155 | + foreach (new RecursiveIteratorIterator($iterator) as $file) { |
|
156 | + if (strpos($file, $filename) !== FALSE && strpos($file, DRUPAL_ROOT.'/sites/') === FALSE) { |
|
157 | 157 | $files[] = (string) $file; |
158 | 158 | } |
159 | 159 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $source = $migration->getSourcePlugin(); |
26 | 26 | /** @var Drupal\migrate_source_csv\CSVFileObject $iterator */ |
27 | 27 | $iterator = $source->initializeIterator(); |
28 | - $filename = $iterator->getPath() . '/' . $iterator->getFilename(); |
|
28 | + $filename = $iterator->getPath().'/'.$iterator->getFilename(); |
|
29 | 29 | |
30 | 30 | /** @var \Drupal\migrate\Plugin\migrate\destination\EntityContentBase $destination_plugin */ |
31 | 31 | $destination_plugin = $migration->getDestinationPlugin(); |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | batch_set($batch); |
225 | 225 | // Set a batch to update configuration as well. |
226 | 226 | if ($batch = locale_config_batch_update_components($options, $langcodes)) { |
227 | - $batch['file'] = drupal_get_path('module', 'df_tools_translation') . '/df_tools_translation.batch.inc'; |
|
227 | + $batch['file'] = drupal_get_path('module', 'df_tools_translation').'/df_tools_translation.batch.inc'; |
|
228 | 228 | batch_set($batch); |
229 | 229 | } |
230 | 230 | } |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | |
251 | 251 | // Import each file. |
252 | 252 | foreach ($langcodes as $langcode) { |
253 | - $filepath = DRUPAL_ROOT . '/' . $path . '/translations/' . $langcode . '.po'; |
|
253 | + $filepath = DRUPAL_ROOT.'/'.$path.'/translations/'.$langcode.'.po'; |
|
254 | 254 | if (file_exists($filepath)) { |
255 | 255 | \Drupal::moduleHandler()->loadInclude('locale', 'bulk.inc'); |
256 | 256 | \Drupal::moduleHandler()->loadInclude('locale', 'translation.inc'); |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | ]); |
265 | 265 | |
266 | 266 | $original_file = (object) [ |
267 | - 'filename' => $langcode . '.po', |
|
267 | + 'filename' => $langcode.'.po', |
|
268 | 268 | 'uri' => $filepath |
269 | 269 | ]; |
270 | 270 | $file = locale_translate_file_attach_properties($original_file, $options); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | if ($langcode == 'en') { |
308 | 308 | $langcode = ''; |
309 | 309 | } |
310 | - $url = \Drupal\Core\Url::fromUri('base:/' . $langcode . $alias); |
|
310 | + $url = \Drupal\Core\Url::fromUri('base:/'.$langcode.$alias); |
|
311 | 311 | |
312 | 312 | $current_name = [ |
313 | 313 | '#markup' => t($language->getName()) |
@@ -26,7 +26,7 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | $form['description'] = [ |
29 | - '#markup' => '<p>' . t('Image derivatives can be created in bulk manually to remove the need for Drupal to create them on page load.') . '</p>', |
|
29 | + '#markup' => '<p>'.t('Image derivatives can be created in bulk manually to remove the need for Drupal to create them on page load.').'</p>', |
|
30 | 30 | ]; |
31 | 31 | $form['image_styles'] = [ |
32 | 32 | '#type' => 'checkboxes', |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | $file_pattern = "[^\/]*"; // Finds anything that does not contain "/", should be fine. |
56 | 56 | } |
57 | 57 | else { |
58 | - $file_pattern = $dir ? $dir . ".+" : ".+"; |
|
58 | + $file_pattern = $dir ? $dir.".+" : ".+"; |
|
59 | 59 | } |
60 | 60 | |
61 | - $regex = "^public:\/\/(" . $file_pattern . ")\.(" . implode($extensions, '|') . ")$"; |
|
61 | + $regex = "^public:\/\/(".$file_pattern.")\.(".implode($extensions, '|').")$"; |
|
62 | 62 | |
63 | 63 | // Query the database for files that match this pattern. |
64 | 64 | $query = db_select('file_managed', 'f') |
65 | - ->condition('filemime', $mimetypes , 'IN') |
|
65 | + ->condition('filemime', $mimetypes, 'IN') |
|
66 | 66 | ->condition('uri', $regex, 'REGEXP'); |
67 | 67 | $total_count = $query->countQuery()->execute()->fetchField(); |
68 | 68 | |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | |
82 | 82 | foreach (\Drupal\image\Entity\ImageStyle::loadMultiple() as $name => $style) { |
83 | 83 | if (!empty($excludes) && in_array($style->getName(), $excludes)) { |
84 | - $operations[] = array('drush_log', array('Excluding ' . $name, 'success')); |
|
84 | + $operations[] = array('drush_log', array('Excluding '.$name, 'success')); |
|
85 | 85 | continue; |
86 | 86 | } |
87 | 87 | |
88 | 88 | if (empty($includes[0]) || in_array($style->getName(), $includes)) { |
89 | - $operations[] = array('drush_log', array('Processing ' . $name, 'success')); |
|
89 | + $operations[] = array('drush_log', array('Processing '.$name, 'success')); |
|
90 | 90 | $count = 1; |
91 | 91 | $last_progress = 0; |
92 | 92 | foreach ($files as $file) { |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if (($progress % 25 === 0 || $progress % 7 === 0) && $progress != $last_progress) { |
100 | 100 | // If we're in the command line, print the percentage, otherwise hide it |
101 | 101 | if (PHP_SAPI === 'cli') { |
102 | - $operations[] = array('drush_print', array('...' . $progress . '%', 0, NULL, ($progress == 100))); |
|
102 | + $operations[] = array('drush_print', array('...'.$progress.'%', 0, NULL, ($progress == 100))); |
|
103 | 103 | } |
104 | 104 | $last_progress = $progress; |
105 | 105 | } |