$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
);
$this->
installOptionalConfig($storage,
[$type =>
$name]);
} // Reset all the static caches and list caches.
$this->configFactory->
reset();
} /**
* {@inheritdoc}
*/
public function installOptionalConfig(StorageInterface
$storage = NULL,
$dependency =
[]) {