public function PreprocessEventFactoryMapper::getFactory in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/preprocess_event_dispatcher/src/Service/PreprocessEventFactoryMapper.php \Drupal\preprocess_event_dispatcher\Service\PreprocessEventFactoryMapper::getFactory()
Get a factory with the provided hook or the default factory.
Parameters
string $hook: The hook name.
Return value
\Drupal\preprocess_event_dispatcher\Factory\PreprocessEventFactoryInterface|null PreprocessEventFactory.
File
- modules/
preprocess_event_dispatcher/ src/ Service/ PreprocessEventFactoryMapper.php, line 39
Class
- PreprocessEventFactoryMapper
- Class PreprocessEventFactoryMapper.
Namespace
Drupal\preprocess_event_dispatcher\ServiceCode
public function getFactory(string $hook) : ?PreprocessEventFactoryInterface {
return $this->hookToFactoryMap[$hook] ?? NULL;
}