DecoratingConfigInstaller.php in Configuration selector 8
File
src/DecoratingConfigInstaller.php
View source
<?php
namespace Drupal\config_selector;
use Drupal\Core\Config\ConfigInstallerInterface;
use Drupal\Core\Config\StorageInterface;
class DecoratingConfigInstaller implements ConfigInstallerInterface {
protected $decoratedService;
public function __construct(ConfigInstallerInterface $config_installer, ConfigSelector $config_selector) {
$this->decoratedService = $config_installer;
$this->configSelector = $config_selector;
}
public function installDefaultConfig($type, $name) {
$this->decoratedService
->installDefaultConfig($type, $name);
}
public function installOptionalConfig(StorageInterface $storage = NULL, $dependency = []) {
$this->decoratedService
->installOptionalConfig($storage, $dependency);
if ($storage === NULL && empty($dependency)) {
$this->configSelector
->selectConfig();
}
}
public function installCollectionDefaultConfig($collection) {
$this->decoratedService
->installCollectionDefaultConfig($collection);
}
public function setSourceStorage(StorageInterface $storage) {
$this->decoratedService
->setSourceStorage($storage);
return $this;
}
public function getSourceStorage() {
return $this->decoratedService
->getSourceStorage();
}
public function setSyncing($status) {
$this->decoratedService
->setSyncing($status);
return $this;
}
public function isSyncing() {
return $this->decoratedService
->isSyncing();
}
public function checkConfigurationToInstall($type, $name) {
$this->decoratedService
->checkConfigurationToInstall($type, $name);
}
}