getOverrideService example


  protected function importConfig($collection$op$name) {
    // Allow config factory overriders to use a custom configuration object if     // they are responsible for the collection.     $overrider = $this->configManager->getConfigCollectionInfo()->getOverrideService($collection);
    if ($overrider) {
      $config = $overrider->createConfigObject($name$collection);
    }
    else {
      $config = new Config($name$this->storageComparer->getTargetStorage($collection)$this->eventDispatcher, $this->typedConfigManager);
    }
    if ($op == 'delete') {
      $config->delete();
    }
    else {
      $data = $this->storageComparer->getSourceStorage($collection)->read($name);
      
$config_names = $dependency_manager
        ->setData($config_to_create)
        ->sortAll();
    }
    else {
      $config_names = array_keys($config_to_create);
    }

    foreach ($config_names as $name) {
      // Allow config factory overriders to use a custom configuration object if       // they are responsible for the collection.       $overrider = $this->configManager->getConfigCollectionInfo()->getOverrideService($collection);
      if ($overrider) {
        $new_config = $overrider->createConfigObject($name$collection);
      }
      else {
        $new_config = new Config($name$this->getActiveStorages($collection)$this->eventDispatcher, $this->typedConfig);
      }
      if ($config_to_create[$name] !== FALSE) {
        // Add a hash to configuration created through the installer so it is         // possible to know if the configuration was created by installing an         // extension and to track which version of the default config was used.         if (!$this->isSyncing() && $collection == StorageInterface::DEFAULT_COLLECTION) {
          
Home | Imprint | This part of the site doesn't use cookies.