예제 #1
0
 /**
  * Constructs a FeaturesManager object.
  *
  * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
  *   The entity manager.
  * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
  *   The configuration factory.
  * @param \Drupal\Core\Config\StorageInterface $config_storage
  *   The target storage.
  * @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
  *   The configuration manager.
  * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
  *   The module handler.
  */
 public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory, StorageInterface $config_storage, ConfigManagerInterface $config_manager, ModuleHandlerInterface $module_handler)
 {
     $this->entityManager = $entity_manager;
     $this->configStorage = $config_storage;
     $this->configManager = $config_manager;
     $this->moduleHandler = $module_handler;
     $this->configFactory = $config_factory;
     $this->settings = $config_factory->getEditable('features.settings');
     $this->assignmentSettings = $config_factory->getEditable('features.assignment');
     $this->extensionStorages = new FeaturesExtensionStorages($this->configStorage);
     $this->extensionStorages->addStorage(InstallStorage::CONFIG_INSTALL_DIRECTORY);
     $this->extensionStorages->addStorage(InstallStorage::CONFIG_OPTIONAL_DIRECTORY);
     $this->packages = [];
     $this->configCollection = [];
 }