InfoHookDecorator example

      $directories = [];
      foreach ($this->moduleHandler->getModuleList() as $name => $module) {
        $directories[$name] = $module->getPath();
      }
      foreach ($this->themeHandler->listInfo() as $theme) {
        $directories[$theme->getName()] = $theme->getPath();
      }

      // Check for files named MODULE.config_translation.yml and       // THEME.config_translation.yml in module/theme roots.       $this->discovery = new YamlDiscovery('config_translation', $directories);
      $this->discovery = new InfoHookDecorator($this->discovery, 'config_translation_info');
      $this->discovery = new ContainerDerivativeDiscoveryDecorator($this->discovery);
    }
    return $this->discovery;
  }

  /** * {@inheritdoc} */
  public function getMappers(RouteCollection $collection = NULL) {
    $mappers = [];
    foreach ($this->getDefinitions() as $id => $definition) {
      
Home | Imprint | This part of the site doesn't use cookies.