function config

Retrieves a configuration object.

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

config('book.admin');

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

Parameters

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

config('book.admin');

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

Return value

Drupal\Core\Config\Config A configuration object.

153 calls to config()
8 string references to 'config'

File

drupal/core/includes/config.inc, line 83
This is the API for configuration storage.

Code

function config($name) {
  return drupal_container()
    ->get('config.factory')
    ->get($name);
}