public function MediaSelectionProcessorManager::process in Gutenberg 8
Same name and namespace in other branches
- 8.2 src/MediaSelectionProcessor/MediaSelectionProcessorManager.php \Drupal\gutenberg\MediaSelectionProcessor\MediaSelectionProcessorManager::process()
Process media selection data by provided processor.
Parameters
string $processor_name: Processor name.
array $data: Data to process.
Return value
mixed The processed media selection data.
Overrides MediaSelectionProcessorManagerInterface::process
1 call to MediaSelectionProcessorManager::process()
- MediaSelectionProcessorManager::processData in src/
MediaSelectionProcessor/ MediaSelectionProcessorManager.php - Process selection data.
File
- src/
MediaSelectionProcessor/ MediaSelectionProcessorManager.php, line 33
Class
- MediaSelectionProcessorManager
- Provides management for tagged media selection processor services.
Namespace
Drupal\gutenberg\MediaSelectionProcessorCode
public function process(string $processor_name, array $data) {
if (!$this
->isRegistered($processor_name)) {
throw new \Exception(sprintf("Processor '%s' is not registered", $processor_name));
}
return $this->processors[$processor_name]
->process($data);
}