public static function Drupal::config

You are here

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\Config A configuration object.

550 calls to Drupal::config()
AccessDeniedTest::testAccessDenied in core/modules/system/lib/Drupal/system/Tests/System/AccessDeniedTest.php
AccountFormController::form in core/modules/user/lib/Drupal/user/AccountFormController.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.
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::testGlobalLoginFloodControl in core/modules/basic_auth/lib/Drupal/basic_auth/Tests/Authentication/BasicAuthTest.php
Test the global login flood control.

... See full list


core/lib/Drupal.php, line 274
Contains Drupal.


Static Service Container wrapper.


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