protected function DemoImage::getSourcePath in Panopoly Core 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 src/
Plugin/ migrate/ process/ DemoImage.php - Performs the associated process.
File
- 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\processCode
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);
}