diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php index 65a7846..9eddc87 100644 --- a/core/lib/Drupal/Core/Config/ConfigManager.php +++ b/core/lib/Drupal/Core/Config/ConfigManager.php @@ -50,6 +50,12 @@ class ConfigManager implements ConfigManagerInterface { * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory + * The configuration factory. + * @param \Drupal\Core\Config\TypedConfigManager $typed_config_manager + * The typed config manager. + * @param \Drupal\Core\StringTranslation\TranslationManager $string_translation + * The string translation service. */ public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory, TypedConfigManager $typed_config_manager, TranslationManager $string_translation) { $this->entityManager = $entity_manager; @@ -80,8 +86,8 @@ public function getEntityManager() { */ 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'; + // https://drupal.org/node/1848266 + require_once __DIR__ . '/../../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 @@ -108,7 +114,7 @@ public function diff(StorageInterface $source_storage, StorageInterface $target_ /** * {@inheritdoc} */ - function createSnapshot(StorageInterface $source_storage, StorageInterface $snapshot_storage) { + public 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)); @@ -123,7 +129,7 @@ function createSnapshot(StorageInterface $source_storage, StorageInterface $snap * @param string $name * The name of the module or theme to install default configuration for. */ - function uninstall($type, $name) { + public function uninstall($type, $name) { $config_names = $this->configFactory->listAll($name . '.'); foreach ($config_names as $config_name) { $this->configFactory->get($config_name)->delete(); @@ -135,4 +141,5 @@ function uninstall($type, $name) { $this->typedConfigManager->clearCachedDefinitions(); } } + } diff --git a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php index e63108d..d78b358 100644 --- a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php @@ -21,7 +21,7 @@ * @return string|null * Either the entity type name, or NULL if none match. */ - function getEntityTypeIdByName($name); + public function getEntityTypeIdByName($name); /** * Gets the entity manager.