public function ConfigImporterService::__construct in Config Importer and Tools 8
Same name and namespace in other branches
- 8.2 src/ConfigImporterService.php \Drupal\config_import\ConfigImporterService::__construct()
- 8.0 src/ConfigImporterService.php \Drupal\config_import\ConfigImporterService::__construct()
ConfigImporterService constructor.
Parameters
UuidInterface $uuid: Uuid.
CachedStorage $config_storage: CachedStorage.
ConfigManagerInterface $config_manager: ConfigManager.
ContainerAwareEventDispatcher $event_dispatcher: ContainerAwareEventDispatcher.
LockBackendInterface $lock: LockBackend.
TypedConfigManager $config_typed: TypedConfigManager.
ModuleHandler $module_handler: ModuleHandler.
ModuleInstaller $module_installer: ModuleInstaller.
ThemeHandler $theme_handler: ThemeHandler.
TranslationManager $translation_manager: TranslationManager.
FileSystem $file_system: FileSystem.
File
- src/
ConfigImporterService.php, line 135
Class
- ConfigImporterService
- Class ConfigImporterService.
Namespace
Drupal\config_importCode
public function __construct(UuidInterface $uuid, CachedStorage $config_storage, ConfigManagerInterface $config_manager, ContainerAwareEventDispatcher $event_dispatcher, LockBackendInterface $lock, TypedConfigManager $config_typed, ModuleHandler $module_handler, ModuleInstaller $module_installer, ThemeHandler $theme_handler, TranslationManager $translation_manager, FileSystem $file_system) {
$this->uuid = $uuid;
$this->configStorage = $config_storage;
$this->configManager = $config_manager;
$this->eventDispatcher = $event_dispatcher;
$this->lock = $lock;
$this->configTyped = $config_typed;
$this->moduleHandler = $module_handler;
$this->moduleInstaller = $module_installer;
$this->themeHandler = $theme_handler;
$this->translationManager = $translation_manager;
$this->fileSystem = $file_system;
// Save current configuration to disable file cache for a while
// and restore afterwards.
$this->fileCacheConfig = FileCacheFactory::getConfiguration();
// @see https://www.drupal.org/node/2758325
FileCacheFactory::setConfiguration([
FileCacheFactory::DISABLE_CACHE => TRUE,
]);
// Sync directory must be configured.
$this
->setDirectory(\Drupal\Core\Site\Settings::get('config_sync_directory'));
}