@@ -55,8 +55,7 @@ |
||
| 55 | 55 | |
| 56 | 56 | drupal_set_message(t('Successfully exported Panelizer display for Node @nid to @panels_file', ['@nid' => $node->id(), '@panels_file' => $panels_file])); |
| 57 | 57 | return TRUE; |
| 58 | - } |
|
| 59 | - else { |
|
| 58 | + } else { |
|
| 60 | 59 | drupal_set_message(t('The given Node is not Panelized.'), 'error'); |
| 61 | 60 | return FALSE; |
| 62 | 61 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | // Write YAML to a file. |
| 52 | - $panels_file = $base_path . '/data/panelizer.panels_display.node.'.$node->uuid() . '.yml'; |
|
| 52 | + $panels_file = $base_path.'/data/panelizer.panels_display.node.'.$node->uuid().'.yml'; |
|
| 53 | 53 | $yaml = \Symfony\Component\Yaml\Yaml::dump($node->panelizer->panels_display, 99, 2); |
| 54 | 54 | file_put_contents($panels_file, $yaml); |
| 55 | 55 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | public function prepareRow(Row $row) { |
| 23 | 23 | if ($image_path = $row->getSourceProperty('Headshot')) { |
| 24 | - $path = dirname($this->configuration['path']) . '/images/' . $image_path; |
|
| 24 | + $path = dirname($this->configuration['path']).'/images/'.$image_path; |
|
| 25 | 25 | |
| 26 | 26 | $data = file_get_contents($path); |
| 27 | 27 | $uri = file_build_uri($image_path); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $links_raw = explode(',', $value); |
| 34 | 34 | $links = []; |
| 35 | 35 | foreach ($links_raw as $link) { |
| 36 | - list($uri,$title) = explode('|', $link); |
|
| 36 | + list($uri, $title) = explode('|', $link); |
|
| 37 | 37 | $links[] = [ |
| 38 | 38 | 'uri' => $uri, |
| 39 | 39 | 'title' => $title, |
@@ -22,12 +22,12 @@ |
||
| 22 | 22 | $strings = explode(' ', $value); |
| 23 | 23 | $first_name = $strings[0]; |
| 24 | 24 | $last_name = $strings[1]; |
| 25 | - $row->setSourceProperty('Name', $first_name . $last_name); |
|
| 25 | + $row->setSourceProperty('Name', $first_name.$last_name); |
|
| 26 | 26 | $row->setSourceProperty('First', $first_name); |
| 27 | 27 | $row->setSourceProperty('Last', $last_name); |
| 28 | 28 | $row->setSourceProperty('Pass', 'password'); |
| 29 | 29 | $row->setSourceProperty('Status', 1); |
| 30 | - $row->setSourceProperty('Mail', $first_name . $last_name . '@example.com'); |
|
| 30 | + $row->setSourceProperty('Mail', $first_name.$last_name.'@example.com'); |
|
| 31 | 31 | } |
| 32 | 32 | } |
| 33 | 33 | } |
@@ -21,11 +21,11 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function prepareRow(Row $row) { |
| 23 | 23 | if ($image = $row->getSourceProperty('Picture')) { |
| 24 | - $base_path = dirname($this->configuration['path']) . '/images/'; |
|
| 24 | + $base_path = dirname($this->configuration['path']).'/images/'; |
|
| 25 | 25 | |
| 26 | 26 | // Setup our source/destination paths. |
| 27 | - $path = $base_path . $image; |
|
| 28 | - $destination_path = 'public://' . $image; |
|
| 27 | + $path = $base_path.$image; |
|
| 28 | + $destination_path = 'public://'.$image; |
|
| 29 | 29 | |
| 30 | 30 | $row->setSourceProperty('filepath', $path); |
| 31 | 31 | $row->setDestinationProperty('uri', $destination_path); |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | /** @var Drupal\migrate_source_csv\CSVFileObject $iterator */ |
| 19 | 19 | $iterator = $source->initializeIterator(); |
| 20 | 20 | $base_path = $iterator->getPath(); |
| 21 | - $filename = $base_path . '/' . $iterator->getFilename(); |
|
| 21 | + $filename = $base_path.'/'.$iterator->getFilename(); |
|
| 22 | 22 | |
| 23 | 23 | $destination = $migration->getDestinationPlugin(); |
| 24 | 24 | $entity_type = explode(':', $destination->getPluginId())[1]; |
@@ -69,14 +69,14 @@ discard block |
||
| 69 | 69 | $entity = $entity_storage->load($id); |
| 70 | 70 | |
| 71 | 71 | // See if a Panelizer config file exists for this Node. |
| 72 | - $panels_file = $base_path . '/panelizer.panels_display.' . $entity_type . '.' . $entity->uuid() . '.yml'; |
|
| 72 | + $panels_file = $base_path.'/panelizer.panels_display.'.$entity_type.'.'.$entity->uuid().'.yml'; |
|
| 73 | 73 | if (file_exists($panels_file) && isset($entity->panelizer)) { |
| 74 | 74 | $yaml = file_get_contents($panels_file); |
| 75 | 75 | |
| 76 | 76 | $panels_display = \Symfony\Component\Yaml\Yaml::parse($yaml); |
| 77 | 77 | |
| 78 | 78 | // The storage ID isn't based on UUIDs, unfortunately. Hotswap it with current info. |
| 79 | - $panels_display['storage_id'] = $entity_type . ':' . $entity->id() . ':full:' . $entity->getRevisionId(); |
|
| 79 | + $panels_display['storage_id'] = $entity_type.':'.$entity->id().':full:'.$entity->getRevisionId(); |
|
| 80 | 80 | |
| 81 | 81 | // Set the Panels Display to match what's defined in YAML. |
| 82 | 82 | $entity->panelizer->panels_display = $panels_display; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function prepareRow(Row $row) { |
| 23 | 23 | if ($image_path = $row->getSourceProperty('Image')) { |
| 24 | - $path = dirname($this->configuration['path']) . '/images/' . $image_path; |
|
| 24 | + $path = dirname($this->configuration['path']).'/images/'.$image_path; |
|
| 25 | 25 | |
| 26 | 26 | $data = file_get_contents($path); |
| 27 | 27 | $uri = file_build_uri($image_path); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // Append the prefix before buildRegions. |
| 49 | - $build['landing-top']['#prefix'] = '<div class="landing-display-' . $class . '">'; |
|
| 49 | + $build['landing-top']['#prefix'] = '<div class="landing-display-'.$class.'">'; |
|
| 50 | 50 | |
| 51 | 51 | // Build the regions via PageBlockDisplayVariant::buildRegions. |
| 52 | 52 | $build = parent::buildRegions($build); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function prepareRow(Row $row) { |
| 23 | 23 | if ($image_path = $row->getSourceProperty('Image')) { |
| 24 | - $path = dirname($this->configuration['path']) . '/images/' . $image_path; |
|
| 24 | + $path = dirname($this->configuration['path']).'/images/'.$image_path; |
|
| 25 | 25 | |
| 26 | 26 | $data = file_get_contents($path); |
| 27 | 27 | $uri = file_build_uri($image_path); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | function df_tools_slideshow_migration_plugins_alter(&$definitions) { |
| 12 | 12 | // Set up base path. |
| 13 | - $path = dirname(__FILE__) . '/data/'; |
|
| 13 | + $path = dirname(__FILE__).'/data/'; |
|
| 14 | 14 | |
| 15 | 15 | $migration = _df_migration_copy($definitions['import_block_base'], 'block', 'slideshow', 'block_content', $path); |
| 16 | 16 | // Add our custom fields. |
@@ -32,8 +32,7 @@ |
||
| 32 | 32 | // Create a MigrateSource object. |
| 33 | 33 | if (isset($arguments['path'])) { |
| 34 | 34 | $import_path = $arguments['path']; |
| 35 | - } |
|
| 36 | - else { |
|
| 35 | + } else { |
|
| 37 | 36 | $import_path = drupal_get_path('module', 'df_tools_commerce_product') . '/import/df_tools_commerce.fpp.commerce_product.csv'; |
| 38 | 37 | } |
| 39 | 38 | $this->source = new MigrateSourceCSV($import_path, array(), array('header_rows' => 1)); |