diff --git a/core/core.api.php b/core/core.api.php index 233d74b..70820d5 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -289,6 +289,7 @@ * @code * $config = \Drupal::config('mymodule.foo'); * @endcode + * * This will be an object of class \Drupal\Core\Config\Config, which has methods * for getting configuration information. For instance, if your YAML file * structure looks like this: @@ -317,10 +318,12 @@ * @endcode * * Individual configuration values can be changed or added using the set() - * method: + * method and saved using the save() method: * @code * // Set a scalar value. * $config->set('enabled', 1); + * // Save the configuration. + * $config->save(); * @endcode * * Configuration values can also be unset using the clear() method, which is @@ -332,12 +335,6 @@ * In this example $config_data would return an array with one key - 'baz' - * because 'boo' was unset. * - * Finally, all changes can then be saved using the save() method: - * @code - * // Save the configuration. - * $config->save(); - * @endcode - * * @section sec_entity Configuration entities * In contrast to the simple configuration settings described in the previous * section, if your module allows users to create zero or more items (where