You are here

protected function DemoImage::getSourcePath in Panopoly 8.2

Gets the source path (within the module providing the migration).

Return value

string The path relative to the Drupal root.

1 call to DemoImage::getSourcePath()
DemoImage::transform in modules/panopoly/panopoly_core/src/Plugin/migrate/process/DemoImage.php
Performs the associated process.

File

modules/panopoly/panopoly_core/src/Plugin/migrate/process/DemoImage.php, line 108

Class

DemoImage
Process plugin for creating demo images from files in the module.

Namespace

Drupal\panopoly_core\Plugin\migrate\process

Code

protected function getSourcePath() {
  $module_path = $this->moduleHandler
    ->getModule($this->migration
    ->getPluginDefinition()['provider'])
    ->getPath();
  $relative_path = !empty($this->configuration['source_path']) ? $this->configuration['source_path'] : 'import/images';
  return $this
    ->removeTrailing($module_path . '/' . $relative_path);
}