public function ImportConfigManipulator::getImportProcessor in Entity Share 8.3
Retrieves a specific processor plugin for this import config.
Parameters
\Drupal\entity_share_client\Entity\ImportConfigInterface $import_config: The import config.
string $processor_id: The ID of the processor plugin to return.
Return value
\Drupal\entity_share_client\ImportProcessor\ImportProcessorInterface The processor plugin with the given ID.
Throws
\Exception Thrown if the specified processor isn't enabled for this import config, or couldn't be loaded.
Overrides ImportConfigManipulatorInterface::getImportProcessor
File
- modules/
entity_share_client/ src/ Service/ ImportConfigManipulator.php, line 104
Class
- ImportConfigManipulator
- Class ImportConfigManipulator.
Namespace
Drupal\entity_share_client\ServiceCode
public function getImportProcessor(ImportConfigInterface $import_config, $processor_id) {
$processors = $this
->getImportProcessors($import_config);
if (empty($processors[$processor_id])) {
$import_config_label = $import_config
->label();
throw new \Exception("The import processor with ID '{$processor_id}' could not be retrieved for import config '{$import_config_label}'.");
}
return $processors[$processor_id];
}