ConfigInstaller
class ConfigInstaller implements ConfigInstallerInterface (View source)
Provides a proxy class for \Drupal\Core\Config\ConfigInstaller.
Traits
Provides dependency injection friendly methods for serialization.
Properties
| protected array | $_serviceIds | An array of service IDs keyed by property name used for serialization. |
from DependencySerializationTrait |
| protected array | $_entityStorages | An array of entity type IDs keyed by the property name of their storages. |
from DependencySerializationTrait |
| protected string | $drupalProxyOriginalServiceId | The id of the original proxied service. |
|
| protected ConfigInstaller | $service | The real proxied service, after it was lazy loaded. |
|
| protected ContainerInterface | $container | The service container. |
Methods
Constructs a ProxyClass Drupal proxy object.
Lazy loads the real service from the container.
Installs the default configuration of a given extension.
Installs optional configuration.
Installs all default configuration in the specified collection.
Sets the configuration storage that provides the default configuration.
Gets the configuration storage that provides the default configuration.
Sets the status of the isSyncing flag.
Gets the syncing state.
Checks the configuration that will be installed for an extension.
Details
__sleep()
{@inheritdoc}
__wakeup()
{@inheritdoc}
__construct(ContainerInterface $container, string $drupal_proxy_original_service_id)
Constructs a ProxyClass Drupal proxy object.
protected object
lazyLoadItself()
Lazy loads the real service from the container.
installDefaultConfig(string $type, string $name)
Installs the default configuration of a given extension.
When an extension is installed, it searches all the default configuration directories for all other extensions to locate any configuration with its name prefix. For example, the Node module provides the frontpage view as a default configuration file: core/modules/node/config/optional/views.view.frontpage.yml When the Views module is installed after the Node module is already enabled, the frontpage view will be installed.
Additionally, the default configuration directory for the extension being installed is searched to discover if it contains default configuration that is owned by other enabled extensions. So, the frontpage view will also be installed when the Node module is installed after Views.
installOptionalConfig(StorageInterface $storage = NULL, array $dependency = array())
Installs optional configuration.
Optional configuration is only installed if:
- the configuration does not exist already.
- it's a configuration entity.
- its dependencies can be met.
installCollectionDefaultConfig(string $collection)
Installs all default configuration in the specified collection.
The function is useful if the site needs to respond to an event that has just created another collection and we need to check all the installed extensions for any matching configuration. For example, if a language has just been created.
$this
setSourceStorage(StorageInterface $storage)
Sets the configuration storage that provides the default configuration.
StorageInterface|null
getSourceStorage()
Gets the configuration storage that provides the default configuration.
$this
setSyncing(bool $status)
Sets the status of the isSyncing flag.
bool
isSyncing()
Gets the syncing state.
checkConfigurationToInstall(string $type, string $name)
Checks the configuration that will be installed for an extension.