8.3.x Drupal.php Drupal::config($name)
8.0.x Drupal.php public static Drupal::config($name)
8.1.x Drupal.php public static Drupal::config($name)
8.2.x Drupal.php public static Drupal::config($name)
8.4.x Drupal.php public static Drupal::config($name)

Retrieves a configuration object.

This is the main entry point to the configuration API. Calling


will return a configuration object in which the book module can store its administrative settings.


string $name: The name of the configuration object to retrieve. The name corresponds to a configuration file. For


, the config object returned will contain the contents of book.admin configuration file.

Return value

\Drupal\Core\Config\ImmutableConfig An immutable configuration object.

179 calls to Drupal::config()
AccountForm::form in core/modules/user/src/AccountForm.php
Gets the actual form array to be built.
AssetDumper::dump in core/lib/Drupal/Core/Asset/AssetDumper.php
The file name for the CSS or JS cache file is generated from the hash of the aggregated contents of the files in $data. This forces proxies and browsers to download new CSS when the CSS changes.
AutomatedCronUpdateWithAutomatedCronTest::testUpdate in core/modules/system/src/Tests/Update/AutomatedCronUpdateWithAutomatedCronTest.php
Ensures that automated cron module isn installed and the config migrated.
AutomatedCronUpdateWithoutAutomatedCronTest::testUpdate in core/modules/system/src/Tests/Update/AutomatedCronUpdateWithoutAutomatedCronTest.php
Ensures that automated cron module isn't installed and the config migrated.
automated_cron_form_system_cron_settings_alter in core/modules/automated_cron/automated_cron.module
Implements hook_form_FORM_ID_alter() for the system_cron_settings() form.

... See full list


core/lib/Drupal.php, line 341
Contains \Drupal.


Static Service Container wrapper.


public static function config($name) {
  return static::getContainer()->get('config.factory')->get($name);