You are here

private function YamlDefinitionsLoader::setUpFactoriesMapper in Hook Event Dispatcher 3.x

Same name and namespace in other branches
  1. 8.2 modules/preprocess_event_dispatcher/tests/src/Unit/Helpers/YamlDefinitionsLoader.php \Drupal\Tests\preprocess_event_dispatcher\Unit\Helpers\YamlDefinitionsLoader::setUpFactoriesMapper()

Set up Factories Mapper.

1 call to YamlDefinitionsLoader::setUpFactoriesMapper()
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 68

Class

YamlDefinitionsLoader
Class YamlDefinitionsLoader.

Namespace

Drupal\Tests\preprocess_event_dispatcher\Unit\Helpers

Code

private function setUpFactoriesMapper() : void {
  $this->mapper = new PreprocessEventFactoryMapper();
  foreach ($this->factories as $entry) {
    $factory = new $entry['class']();
    $this->mapper
      ->addFactory($factory);
  }
}