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.

159 calls to Drupal::config()
AccountForm::form in core/modules/user/src/AccountForm.php
Returns the actual form array to be built.
aggregator_filter_xss in core/modules/aggregator/aggregator.module
Renders the HTML content safely, as allowed.
AjaxResponse::ajaxRender in core/lib/Drupal/Core/Ajax/AjaxResponse.php
Prepares the AJAX commands for sending back to the client.
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.

... 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);