From 19f5b35303b620160afdcf2b4ad84178bb839c07 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Tue, 4 Mar 2014 13:46:57 +0000 Subject: [PATCH] Issue #2193607 by andypost: Fix documentation in ConfigManager. --- core/lib/Drupal/Core/Config/ConfigManager.php | 22 ++++++++++--------- .../Core/Config/ConfigManagerInterface.php | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/core/lib/Drupal/Core/Config/ConfigManager.php b/core/lib/Drupal/Core/Config/ConfigManager.php index 65a78461862a..d52e8064bba4 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)); @@ -116,14 +122,9 @@ function createSnapshot(StorageInterface $source_storage, StorageInterface $snap } /** - * 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. + * {@inheritdoc} */ - 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 +136,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 e63108d9b5da..d78b35879411 100644 --- a/core/lib/Drupal/Core/Config/ConfigManagerInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigManagerInterface.php @@ -21,7 +21,7 @@ interface ConfigManagerInterface { * @return string|null * Either the entity type name, or NULL if none match. */ - function getEntityTypeIdByName($name); + public function getEntityTypeIdByName($name); /** * Gets the entity manager. -- GitLab