Commit 4009f8f7 authored by jhodgdon's avatar jhodgdon

Issue #1793990 by vladan.me, chx, socketwench, -enzo-: Fix up docs on Config class

parent 8ffc33b0
......@@ -71,7 +71,7 @@ class Config {
protected $context;
/**
* Whether the config object has already been loaded.
* Whether the configuration object has already been loaded.
*
* @var bool
*/
......@@ -139,6 +139,9 @@ public function getName() {
/**
* Sets the name of this configuration object.
*
* @param string $name
* The name of the configuration object.
*
* @return \Drupal\Core\Config\Config
* The configuration object.
*/
......@@ -150,6 +153,9 @@ public function setName($name) {
/**
* Validates the configuration object name.
*
* @param string $name
* The name of the configuration object.
*
* @throws \Drupal\Core\Config\ConfigNameException
*
* @see Config::MAX_NAME_LENGTH
......@@ -182,7 +188,7 @@ public static function validateName($name) {
* Returns whether this configuration object is new.
*
* @return bool
* TRUE if this config object does not exist in storage.
* TRUE if this configuration object does not exist in storage.
*/
public function isNew() {
if (!$this->isLoaded) {
......@@ -192,11 +198,11 @@ public function isNew() {
}
/**
* Gets data from this config object.
* Gets data from this configuration object.
*
* @param string $key
* A string that maps to a key within the configuration data.
* For instance in the following configuation array:
* For instance in the following configuration array:
* @code
* array(
* 'foo' => array(
......@@ -317,11 +323,11 @@ protected function resetOverriddenData() {
}
/**
* Sets value in this config object.
* Sets a value in this configuration object.
*
* @param string $key
* Identifier to store value in config.
* @param string $value
* Identifier to store value in configuration.
* @param mixed $value
* Value to associate with identifier.
*
* @return \Drupal\Core\Config\Config
......@@ -346,7 +352,7 @@ public function set($key, $value) {
}
/**
* Unsets value in this config object.
* Unsets a value in this configuration object.
*
* @param string $key
* Name of the key whose value should be unset.
......@@ -426,7 +432,7 @@ public function delete() {
}
/**
* Retrieve the storage used to load and save this configuration object.
* Retrieves the storage used to load and save this configuration object.
*
* @return \Drupal\Core\Config\StorageInterface
* The configuration storage object.
......@@ -436,7 +442,10 @@ public function getStorage() {
}
/**
* Dispatch a config event.
* Dispatches a configuration event.
*
* @param string $config_event_name
* The configuration event name.
*/
protected function notify($config_event_name) {
$this->context->notify($config_event_name, $this);
......@@ -455,7 +464,7 @@ public function merge(array $data_to_merge) {
if (!$this->isLoaded) {
$this->load();
}
// Preserve integer keys so that config keys are not changed.
// Preserve integer keys so that configuration keys are not changed.
$this->replaceData(NestedArray::mergeDeepArray(array($this->data, $data_to_merge), TRUE));
return $this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment