Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
51d9879c
Commit
51d9879c
authored
Feb 10, 2014
by
catch
Browse files
Issue
#2188595
by alexpott, jibran: Create a ConfigManager to be able to remove config.inc.
parent
9526bb82
Changes
18
Hide whitespace changes
Inline
Side-by-side
core/core.services.yml
View file @
51d9879c
...
...
@@ -70,6 +70,9 @@ services:
class
:
Drupal\Core\Config\FileStorage
factory_class
:
Drupal\Core\Config\FileStorageFactory
factory_method
:
getActive
config.manager
:
class
:
Drupal\Core\Config\ConfigManager
arguments
:
[
'
@entity.manager'
,
'
@config.factory'
,
'
@config.typed'
,
'
@string_translation'
]
config.storage
:
class
:
Drupal\Core\Config\CachedStorage
arguments
:
[
'
@config.cachedstorage.storage'
,
'
@cache.config'
]
...
...
@@ -83,7 +86,7 @@ services:
arguments
:
[
'
@config.storage'
,
'
@event_dispatcher'
,
'
@config.typed'
]
config.installer
:
class
:
Drupal\Core\Config\ConfigInstaller
arguments
:
[
'
@config.factory'
,
'
@config.storage'
,
'
@config.typed'
,
'
@
entity
.manager'
,
'
@event_dispatcher'
]
arguments
:
[
'
@config.factory'
,
'
@config.storage'
,
'
@config.typed'
,
'
@
config
.manager'
,
'
@event_dispatcher'
]
config.storage.staging
:
class
:
Drupal\Core\Config\FileStorage
factory_class
:
Drupal\Core\Config\FileStorageFactory
...
...
@@ -540,7 +543,7 @@ services:
class
:
Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber
tags
:
-
{
name
:
event_subscriber
}
arguments
:
[
'
@config.storage'
,
'
@config.storage.snapshot'
]
arguments
:
[
'
@config.manager'
,
'
@config.storage'
,
'
@config.storage.snapshot'
]
exception_controller
:
class
:
Drupal\Core\Controller\ExceptionController
arguments
:
[
'
@content_negotiation'
,
'
@string_translation'
,
'
@title_resolver'
,
'
@html_page_renderer'
,
'
@html_fragment_renderer'
]
...
...
core/includes/config.inc
View file @
51d9879c
<?php
use
Drupal\Component\Utility\Unicode
;
use
Drupal\Core\Config\Config
;
use
Drupal\Core\Config\ConfigException
;
use
Drupal\Core\Language\Language
;
use
Drupal\Core\Config\ExtensionInstallStorage
;
use
Drupal\Core\Config\FileStorage
;
use
Drupal\Core\Config\StorageInterface
;
use
Drupal\Core\Entity\EntityTypeInterface
;
use
Symfony\Component\Yaml\Dumper
;
use
Symfony\Component\EventDispatcher\EventDispatcher
;
/**
* @file
* This is the API for configuration storage.
*/
/**
* Uninstalls the default configuration of a given extension.
*
* @param string $type
* The extension type; e.g., 'module' or 'theme'.
* @param string $name
* The name of the module or theme to install default configuration for.
*/
function
config_uninstall_default_config
(
$type
,
$name
)
{
$storage
=
\
Drupal
::
service
(
'config.storage'
);
$config_names
=
$storage
->
listAll
(
$name
.
'.'
);
foreach
(
$config_names
as
$config_name
)
{
\
Drupal
::
config
(
$config_name
)
->
delete
();
}
$schema_dir
=
drupal_get_path
(
$type
,
$name
)
.
'/config/schema'
;
if
(
is_dir
(
$schema_dir
))
{
// Refresh the schema cache if uninstalling an extension that provides
// configuration schema.
\
Drupal
::
service
(
'config.typed'
)
->
clearCachedDefinitions
();
}
}
/**
* Gets configuration object names starting with a given prefix.
*
* @see \Drupal\Core\Config\StorageInterface::listAll()
* @deprecated Deprecated since Drupal 8.x-dev, to be removed in Drupal 8.0.
* Use \Drupal::configFactory()->listAll() instead.
*/
function
config_get_storage_names_with_prefix
(
$prefix
=
''
)
{
return
\
Drupal
::
service
(
'config.storage'
)
->
listAll
(
$prefix
);
return
\
Drupal
::
configFactory
(
)
->
listAll
(
$prefix
);
}
/**
...
...
@@ -54,7 +22,8 @@ function config_get_storage_names_with_prefix($prefix = '') {
* @code \Drupal::config('book.admin') @endcode will return a configuration
* object in which the book module can store its administrative settings.
*
* @deprecated as of Drupal 8.0. Use \Drupal::config() instead.
* @deprecated Deprecated since Drupal 8.x-dev, to be removed in Drupal 8.0.
* Use \Drupal::config() instead.
*
* @param string $name
* The name of the configuration object to retrieve. The name corresponds to
...
...
@@ -69,27 +38,14 @@ function config($name) {
return
\
Drupal
::
config
(
$name
);
}
/**
* Returns the entity type of a configuration object.
*
* @param string $name
* The configuration object name.
*
* @return string|null
* Either the entity type name, or NULL if none match.
*/
function
config_get_entity_type_by_name
(
$name
)
{
$entities
=
array_filter
(
\
Drupal
::
entityManager
()
->
getDefinitions
(),
function
(
EntityTypeInterface
$entity_type
)
use
(
$name
)
{
return
(
$config_prefix
=
$entity_type
->
getConfigPrefix
())
&&
strpos
(
$name
,
$config_prefix
.
'.'
)
===
0
;
});
return
key
(
$entities
);
}
/**
* Returns the typed config manager service.
*
* Use the typed data manager service for creating typed configuration objects.
*
* @deprecated Deprecated since Drupal 8.x-dev, to be removed in Drupal 8.0.
* Use \Drupal::service('config.typed') instead.
*
* @see \Drupal\Core\TypedData\TypedDataManager::create()
*
* @return \Drupal\Core\Config\TypedConfigManager
...
...
@@ -98,57 +54,3 @@ function config_typed() {
return
\
Drupal
::
service
(
'config.typed'
);
}
/**
* Creates a configuration snapshot following a successful import.
*
* @param \Drupal\Core\Config\StorageInterface $source_storage
* The storage to synchronize configuration from.
* @param \Drupal\Core\Config\StorageInterface $snapshot_storage
* The storage to synchronize configuration to.
*/
function
config_import_create_snapshot
(
StorageInterface
$source_storage
,
StorageInterface
$snapshot_storage
)
{
$snapshot_storage
->
deleteAll
();
foreach
(
$source_storage
->
listAll
()
as
$name
)
{
$snapshot_storage
->
write
(
$name
,
$source_storage
->
read
(
$name
));
}
}
/**
* Return a formatted diff of a named config between two storages.
*
* @param \Drupal\Core\Config\StorageInterface $source_storage
* The storage to diff configuration from.
* @param \Drupal\Core\Config\StorageInterface $target_storage
* The storage to diff configuration to.
* @param string $name
* The name of the configuration object to diff.
*
* @return core/lib/Drupal/Component/Diff
* A formatted string showing the difference between the two storages.
*
* @todo Make renderer injectable
*/
function
config_diff
(
StorageInterface
$source_storage
,
StorageInterface
$target_storage
,
$name
)
{
require_once
DRUPAL_ROOT
.
'/core/lib/Drupal/Component/Diff/DiffEngine.php'
;
// The output should show configuration object differences formatted as YAML.
// But the configuration is not necessarily stored in files. Therefore, they
// need to be read and parsed, and lastly, dumped into YAML strings.
$dumper
=
new
Dumper
();
$dumper
->
setIndentation
(
2
);
$source_data
=
explode
(
"
\n
"
,
$dumper
->
dump
(
$source_storage
->
read
(
$name
),
PHP_INT_MAX
));
$target_data
=
explode
(
"
\n
"
,
$dumper
->
dump
(
$target_storage
->
read
(
$name
),
PHP_INT_MAX
));
// Check for new or removed files.
if
(
$source_data
===
array
(
'false'
))
{
// Added file.
$source_data
=
array
(
t
(
'File added'
));
}
if
(
$target_data
===
array
(
'false'
))
{
// Deleted file.
$target_data
=
array
(
t
(
'File removed'
));
}
return
new
Diff
(
$source_data
,
$target_data
);
}
core/includes/install.core.inc
View file @
51d9879c
...
...
@@ -2191,7 +2191,7 @@ function install_finished(&$install_state) {
// Save a snapshot of the initially installed configuration.
$active
=
\
Drupal
::
service
(
'config.storage'
);
$snapshot
=
\
Drupal
::
service
(
'config.storage.snapshot'
);
config_import_
create
_s
napshot
(
$active
,
$snapshot
);
\
Drupal
::
service
(
'config.manager'
)
->
create
S
napshot
(
$active
,
$snapshot
);
return
$output
;
}
...
...
core/lib/Drupal/Core/Config/ConfigFactory.php
View file @
51d9879c
...
...
@@ -345,6 +345,13 @@ public function getLanguageConfigName($langcode, $name) {
return
static
::
LANGUAGE_CONFIG_PREFIX
.
'.'
.
$langcode
.
'.'
.
$name
;
}
/**
* {@inheritdoc}
*/
public
function
listAll
(
$prefix
=
''
)
{
return
$this
->
storage
->
listAll
(
$prefix
);
}
/**
* Determines if a particular configuration object can be overridden.
*
...
...
core/lib/Drupal/Core/Config/ConfigFactoryInterface.php
View file @
51d9879c
...
...
@@ -182,4 +182,18 @@ public function getLanguageConfigNames(array $names);
*/
public
function
getLanguageConfigName
(
$langcode
,
$name
);
/**
* Gets configuration object names starting with a given prefix.
*
* @see \Drupal\Core\Config\StorageInterface::listAll()
*
* @param string $prefix
* (optional) The prefix to search for. If omitted, all configuration object
* names that exist are returned.
*
* @return array
* An array containing matching configuration object names.
*/
public
function
listAll
(
$prefix
=
''
);
}
core/lib/Drupal/Core/Config/ConfigImporter.php
View file @
51d9879c
...
...
@@ -7,10 +7,7 @@
namespace
Drupal\Core\Config
;
use
Drupal\Core\Config\TypedConfigManager
;
use
Drupal\Core\Entity\EntityManagerInterface
;
use
Drupal\Core\Lock\LockBackendInterface
;
use
Drupal\Component\Uuid\UuidInterface
;
use
Symfony\Component\EventDispatcher\EventDispatcherInterface
;
/**
...
...
@@ -54,25 +51,25 @@ class ConfigImporter {
protected
$eventDispatcher
;
/**
* The configuration
factory
.
* The configuration
manager
.
*
* @var \Drupal\Core\Config\Config
Factory
* @var \Drupal\Core\Config\Config
ManagerInterface
*/
protected
$config
Factory
;
protected
$config
Manager
;
/**
* The
plugin manager for entities
.
* The
used lock backend instance
.
*
* @var \Drupal\Core\
Entity\EntityManager
Interface
* @var \Drupal\Core\
Lock\LockBackend
Interface
*/
protected
$
entityManager
;
protected
$
lock
;
/**
* The
used lock backend instance
.
* The
typed config manager
.
*
* @var \Drupal\Core\
Lock\LockBackendInterface
* @var \Drupal\Core\
Config\TypedConfigManager
*/
protected
$
lock
;
protected
$
typedConfigManager
;
/**
* List of changes processed by the import().
...
...
@@ -88,20 +85,6 @@ class ConfigImporter {
*/
protected
$validated
;
/**
* The UUID service.
*
* @var \Drupal\Component\Uuid\UuidInterface
*/
protected
$uuidService
;
/**
* The typed config manager.
*
* @var \Drupal\Core\Config\TypedConfigManager
*/
protected
$typedConfigManager
;
/**
* Constructs a configuration import object.
*
...
...
@@ -110,24 +93,18 @@ class ConfigImporter {
* access the source and target storage objects.
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher used to notify subscribers of config import events.
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* The config factory that statically caches config objects.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager used to import config entities.
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* The configuration manager.
* @param \Drupal\Core\Lock\LockBackendInterface
* The lock backend to ensure multiple imports do not occur at the same time.
* @param \Drupal\Component\Uuid\UuidInterface $uuid_service
* The UUID service.
* @param \Drupal\Core\Config\TypedConfigManager $typed_config
* The typed configuration manager.
*/
public
function
__construct
(
StorageComparerInterface
$storage_comparer
,
EventDispatcherInterface
$event_dispatcher
,
Config
Factory
$config_factory
,
Entity
ManagerInterface
$
entity
_manager
,
LockBackendInterface
$lock
,
UuidInterface
$uuid_service
,
TypedConfigManager
$typed_config
)
{
public
function
__construct
(
StorageComparerInterface
$storage_comparer
,
EventDispatcherInterface
$event_dispatcher
,
ConfigManagerInterface
$
config
_manager
,
LockBackendInterface
$lock
,
TypedConfigManager
$typed_config
)
{
$this
->
storageComparer
=
$storage_comparer
;
$this
->
eventDispatcher
=
$event_dispatcher
;
$this
->
configFactory
=
$config_factory
;
$this
->
entityManager
=
$entity_manager
;
$this
->
configManager
=
$config_manager
;
$this
->
lock
=
$lock
;
$this
->
uuidService
=
$uuid_service
;
$this
->
typedConfigManager
=
$typed_config
;
$this
->
processed
=
$this
->
storageComparer
->
getEmptyChangelist
();
}
...
...
@@ -294,7 +271,7 @@ protected function importInvokeOwner() {
$handled_by_module
=
FALSE
;
// Validate the configuration object name before importing it.
// Config::validateName($name);
if
(
$entity_type
=
config_
get
_e
ntity
_t
ype
_by_n
ame
(
$name
))
{
if
(
$entity_type
=
$this
->
configManager
->
get
E
ntity
T
ype
IdByN
ame
(
$name
))
{
$old_config
=
new
Config
(
$name
,
$this
->
storageComparer
->
getTargetStorage
(),
$this
->
eventDispatcher
,
$this
->
typedConfigManager
);
if
(
$old_data
=
$this
->
storageComparer
->
getTargetStorage
()
->
read
(
$name
))
{
$old_config
->
initWithData
(
$old_data
);
...
...
@@ -307,7 +284,7 @@ protected function importInvokeOwner() {
}
$method
=
'import'
.
ucfirst
(
$op
);
$handled_by_module
=
$this
->
e
ntityManager
->
getStorageController
(
$entity_type
)
->
$method
(
$name
,
$new_config
,
$old_config
);
$handled_by_module
=
$this
->
configManager
->
getE
ntityManager
()
->
getStorageController
(
$entity_type
)
->
$method
(
$name
,
$new_config
,
$old_config
);
}
if
(
!
empty
(
$handled_by_module
))
{
$this
->
setProcessed
(
$op
,
$name
);
...
...
core/lib/Drupal/Core/Config/ConfigInstaller.php
View file @
51d9879c
...
...
@@ -8,7 +8,6 @@
namespace
Drupal\Core\Config
;
use
Drupal\Component\Utility\Unicode
;
use
Drupal\Core\Entity\EntityManagerInterface
;
use
Symfony\Component\EventDispatcher\EventDispatcherInterface
;
class
ConfigInstaller
implements
ConfigInstallerInterface
{
...
...
@@ -35,11 +34,11 @@ class ConfigInstaller implements ConfigInstallerInterface {
protected
$typedConfig
;
/**
* The
entity
manager.
* The
configuration
manager.
*
* @var \Drupal\Core\
Entity\Entity
ManagerInterface
* @var \Drupal\Core\
Config\Config
ManagerInterface
*/
protected
$
entity
Manager
;
protected
$
config
Manager
;
/**
* The event dispatcher.
...
...
@@ -57,16 +56,16 @@ class ConfigInstaller implements ConfigInstallerInterface {
* The active configuration storage.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
* The typed configuration manager.
* @param \Drupal\Core\
Entity\Entity
ManagerInterface $
entity
_manager
* The
entity
manager.
* @param \Drupal\Core\
Config\Config
ManagerInterface $
config
_manager
* The
configuration
manager.
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public
function
__construct
(
ConfigFactory
$config_factory
,
StorageInterface
$active_storage
,
TypedConfigManagerInterface
$typed_config
,
Entity
ManagerInterface
$
entity
_manager
,
EventDispatcherInterface
$event_dispatcher
)
{
public
function
__construct
(
ConfigFactory
$config_factory
,
StorageInterface
$active_storage
,
TypedConfigManagerInterface
$typed_config
,
Config
ManagerInterface
$
config
_manager
,
EventDispatcherInterface
$event_dispatcher
)
{
$this
->
configFactory
=
$config_factory
;
$this
->
activeStorage
=
$active_storage
;
$this
->
typedConfig
=
$typed_config
;
$this
->
entity
Manager
=
$
entity
_manager
;
$this
->
config
Manager
=
$
config
_manager
;
$this
->
eventDispatcher
=
$event_dispatcher
;
}
...
...
@@ -119,8 +118,9 @@ public function installDefaultConfig($type, $name) {
if
(
$data
!==
FALSE
)
{
$new_config
->
setData
(
$data
);
}
if
(
$entity_type
=
config_get_entity_type_by_name
(
$name
))
{
$this
->
entityManager
if
(
$entity_type
=
$this
->
configManager
->
getEntityTypeIdByName
(
$name
))
{
$this
->
configManager
->
getEntityManager
()
->
getStorageController
(
$entity_type
)
->
create
(
$new_config
->
get
())
->
save
();
...
...
core/lib/Drupal/Core/Config/ConfigManager.php
0 → 100644
View file @
51d9879c
<?php
/**
* @file
* Contains \Drupal\Core\Config\ConfigManager.
*/
namespace
Drupal\Core\Config
;
use
Drupal\Core\Entity\EntityManagerInterface
;
use
Drupal\Core\Entity\EntityTypeInterface
;
use
Drupal\Core\StringTranslation\TranslationManager
;
use
Symfony\Component\Yaml\Dumper
;
/**
* The ConfigManager provides helper functions for the configuration system.
*/
class
ConfigManager
implements
ConfigManagerInterface
{
/**
* The entity manager.
*
* @var \Drupal\Core\Entity\EntityManagerInterface
*/
protected
$entityManager
;
/**
* The configuration factory.
*
* @var \Drupal\Core\Config\ConfigFactoryInterface
*/
protected
$configFactory
;
/**
* The typed config manager.
*
* @var \Drupal\Core\Config\TypedConfigManager
*/
protected
$typedConfigManager
;
/**
* The string translation service.
*
* @var \Drupal\Core\StringTranslation\TranslationManager
*/
protected
$stringTranslation
;
/**
* Creates ConfigManager objects.
*
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager.
*/
public
function
__construct
(
EntityManagerInterface
$entity_manager
,
ConfigFactoryInterface
$config_factory
,
TypedConfigManager
$typed_config_manager
,
TranslationManager
$string_translation
)
{
$this
->
entityManager
=
$entity_manager
;
$this
->
configFactory
=
$config_factory
;
$this
->
typedConfigManager
=
$typed_config_manager
;
$this
->
stringTranslation
=
$string_translation
;
}
/**
* {@inheritdoc}
*/
public
function
getEntityTypeIdByName
(
$name
)
{
$entities
=
array_filter
(
$this
->
entityManager
->
getDefinitions
(),
function
(
EntityTypeInterface
$entity_type
)
use
(
$name
)
{
return
(
$config_prefix
=
$entity_type
->
getConfigPrefix
())
&&
strpos
(
$name
,
$config_prefix
.
'.'
)
===
0
;
});
return
key
(
$entities
);
}
/**
* {@inheritdoc}
*/
public
function
getEntityManager
()
{
return
$this
->
entityManager
;
}
/**
* {@inheritdoc}
*/
public
function
diff
(
StorageInterface
$source_storage
,
StorageInterface
$target_storage
,
$name
)
{
// @todo Replace with code that can be autoloaded.
// https://drupal.org/node/2188595
require_once
DRUPAL_ROOT
.
'/core/lib/Drupal/Component/Diff/DiffEngine.php'
;
// The output should show configuration object differences formatted as YAML.
// But the configuration is not necessarily stored in files. Therefore, they
// need to be read and parsed, and lastly, dumped into YAML strings.
$dumper
=
new
Dumper
();
$dumper
->
setIndentation
(
2
);
$source_data
=
explode
(
"
\n
"
,
$dumper
->
dump
(
$source_storage
->
read
(
$name
),
PHP_INT_MAX
));
$target_data
=
explode
(
"
\n
"
,
$dumper
->
dump
(
$target_storage
->
read
(
$name
),
PHP_INT_MAX
));
// Check for new or removed files.
if
(
$source_data
===
array
(
'false'
))
{
// Added file.
$source_data
=
array
(
$this
->
stringTranslation
->
translate
(
'File added'
));
}
if
(
$target_data
===
array
(
'false'
))
{
// Deleted file.
$target_data
=
array
(
$this
->
stringTranslation
->
translate
(
'File removed'
));
}
return
new
\
Diff
(
$source_data
,
$target_data
);
}
/**
* {@inheritdoc}
*/
function
createSnapshot
(
StorageInterface
$source_storage
,
StorageInterface
$snapshot_storage
)
{
$snapshot_storage
->
deleteAll
();
foreach
(
$source_storage
->
listAll
()
as
$name
)
{
$snapshot_storage
->
write
(
$name
,
$source_storage
->
read
(
$name
));
}
}
/**
* Uninstalls the default configuration of a given extension.
*
* @param string $type
* The extension type; e.g., 'module' or 'theme'.
* @param string $name
* The name of the module or theme to install default configuration for.
*/
function
uninstall
(
$type
,
$name
)
{
$config_names
=
$this
->
configFactory
->
listAll
(
$name
.
'.'
);
foreach
(
$config_names
as
$config_name
)
{
$this
->
configFactory
->
get
(
$config_name
)
->
delete
();
}
$schema_dir
=
drupal_get_path
(
$type
,
$name
)
.
'/config/schema'
;
if
(
is_dir
(
$schema_dir
))
{
// Refresh the schema cache if uninstalling an extension that provides
// configuration schema.
$this
->
typedConfigManager
->
clearCachedDefinitions
();
}
}
}
core/lib/Drupal/Core/Config/ConfigManagerInterface.php
0 → 100644
View file @
51d9879c
<?php
/**
* @file
* Contains \Drupal\Core\Config\ConfigManagerInterface.
*/
namespace
Drupal\Core\Config
;
/**
* Provides an interface for configuration manager.
*/
interface
ConfigManagerInterface
{
/**
* Returns the entity type of a configuration object.
*
* @param string $name
* The configuration object name.
*
* @return string|null
* Either the entity type name, or NULL if none match.
*/
function
getEntityTypeIdByName
(
$name
);
/**
* Gets the entity manager.
*
* @return \Drupal\Core\Entity\EntityManagerInterface
* The entity manager.
*/
public
function
getEntityManager
();
/**
* Return a formatted diff of a named config between two storages.
*
* @param \Drupal\Core\Config\StorageInterface $source_storage
* The storage to diff configuration from.
* @param \Drupal\Core\Config\StorageInterface $target_storage
* The storage to diff configuration to.
* @param string $name
* The name of the configuration object to diff.
*
* @return core/lib/Drupal/Component/Diff
* A formatted string showing the difference between the two storages.
*
* @todo Make renderer injectable
*/
public
function
diff
(
StorageInterface
$source_storage
,
StorageInterface
$target_storage
,
$name
);
/**
* Creates a configuration snapshot following a successful import.
*
* @param \Drupal\Core\Config\StorageInterface $source_storage
* The storage to synchronize configuration from.
* @param \Drupal\Core\Config\StorageInterface $snapshot_storage
* The storage to synchronize configuration to.
*/
public
function
createSnapshot
(
StorageInterface
$source_storage
,
StorageInterface
$snapshot_storage
);
/**
* Uninstalls the configuration of a given extension.
*
* @param string $type
* The extension type; e.g., 'module' or 'theme'.
* @param string $name
* The name of the module or theme to install configuration for.
*/
public
function
uninstall
(
$type
,
$name
);
}
core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php
View file @
51d9879c
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\Core\EventSubscriber
;
use
Drupal\Core\Config\Config
;
use
Drupal\Core\Config\ConfigManagerInterface
;
use
Drupal\Core\Config\StorageInterface
;
use
Drupal\Core\Config\ConfigImporterEvent
;
use
Symfony\Component\EventDispatcher\EventSubscriberInterface
;
...
...
@@ -17,6 +18,13 @@
*/
class
ConfigSnapshotSubscriber
implements
EventSubscriberInterface
{
/**
* The