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
4009f8f7
Commit
4009f8f7
authored
Nov 11, 2013
by
Jennifer Hodgdon
Browse files
Issue
#1793990
by vladan.me, chx, socketwench, -enzo-: Fix up docs on Config class
parent
8ffc33b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Config/Config.php
View file @
4009f8f7
...
...
@@ -71,7 +71,7 @@ class Config {
protected
$context
;
/**
* Whether the config object has already been loaded.
* Whether the config
uration
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 config
uration
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 config
uration
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 configu
r
ation array:
* @code
* array(
* 'foo' => array(
...
...
@@ -317,11 +323,11 @@ protected function resetOverriddenData() {
}
/**
* Sets value in this config object.
* Sets
a
value in this config
uration
object.
*
* @param string $key
* Identifier to store value in config.
* @param
string
$value
* Identifier to store value in config
uration
.
* @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 config
uration
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.
* Retrieve
s
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 config
uration
keys are not changed.
$this
->
replaceData
(
NestedArray
::
mergeDeepArray
(
array
(
$this
->
data
,
$data_to_merge
),
TRUE
));
return
$this
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment