private function YamlDefinitionsLoader::loadDefinitionsFromServicesYaml in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/YamlDefinitionsLoader.php \Drupal\Tests\preprocess_event_dispatcher\Unit\Helpers\YamlDefinitionsLoader::loadDefinitionsFromServicesYaml()
Load the definitions from the services YAML.
1 call to YamlDefinitionsLoader::loadDefinitionsFromServicesYaml()
- YamlDefinitionsLoader::__construct in modules/
preprocess_event_dispatcher/ tests/ src/ Unit/ Helpers/ YamlDefinitionsLoader.php - YamlDefinitionsLoader constructor.
File
- modules/
preprocess_event_dispatcher/ tests/ src/ Unit/ Helpers/ YamlDefinitionsLoader.php, line 55
Class
- YamlDefinitionsLoader
- Class YamlDefinitionsLoader.
Namespace
Drupal\Tests\preprocess_event_dispatcher\Unit\HelpersCode
private function loadDefinitionsFromServicesYaml() : void {
$yaml = new Parser();
$content = file_get_contents(dirname(__DIR__, 4) . '/preprocess_event_dispatcher.services.yml');
$factories = $this->services = $yaml
->parse($content)['services'];
// Remove the Service and Factory Mapper.
unset($factories['preprocess_event.service'], $factories['preprocess_event.factory_mapper']);
$this->factories = $factories;
}