8 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.

167 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.
BasicAuthTest::testBasicAuth in core/modules/basic_auth/src/Tests/Authentication/BasicAuthTest.php
Test http basic authentication.
block_help in core/modules/block/block.module
Implements hook_help().
block_page_top in core/modules/block/block.module
Implements hook_page_top().

... See full list


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


Static Service Container wrapper.


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