if (!
empty($config_to_create)) { $this->
createConfiguration($collection,
$config_to_create);
} } } // During a drupal installation optional configuration is installed at the
// end of the installation process. Once the install profile is installed
// optional configuration should be installed as usual.
// @see install_install_profile()
$profile_installed =
in_array($this->
drupalGetProfile(),
$this->
getEnabledExtensions(), TRUE
);
if (!
$this->
isSyncing() && (!InstallerKernel::
installationAttempted() ||
$profile_installed)) { $optional_install_path =
$extension_path . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY;
if (is_dir($optional_install_path)) { // Install any optional config the module provides.
$storage =
new FileStorage($optional_install_path, StorageInterface::DEFAULT_COLLECTION
);
$this->
installOptionalConfig($storage, ''
);
} // Install any optional configuration entities whose dependencies can now
// be met. This searches all the installed modules config/optional
// directories.
$storage =
new ExtensionInstallStorage($this->
getActiveStorages(StorageInterface::DEFAULT_COLLECTION
), InstallStorage::CONFIG_OPTIONAL_DIRECTORY, StorageInterface::DEFAULT_COLLECTION, FALSE,
$this->installProfile
);