public static function Settings::get in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Site/Settings.php \Drupal\Core\Site\Settings::get()
Returns a setting.
Settings can be set in settings.php in the $settings array and requested by this function. Settings should be used over configuration for read-only, possibly low bootstrap configuration that is environment specific.
Parameters
string $name: The name of the setting to return.
mixed $default: (optional) The default value to use if this setting is not set.
Return value
mixed The value of the setting, the provided default if not set.
50 calls to Settings::get()
- authorize_access_allowed in core/
authorize.php - Determines if the current user is allowed to run authorize.php.
- BootstrapConfigStorageFactory::get in core/
lib/ Drupal/ Core/ Config/ BootstrapConfigStorageFactory.php - Returns a configuration storage implementation.
- ClientFactory::fromOptions in core/
lib/ Drupal/ Core/ Http/ ClientFactory.php - Constructs a new client object from some configuration.
- ConfigImportSubscriber::validateModules in core/
lib/ Drupal/ Core/ EventSubscriber/ ConfigImportSubscriber.php - Validates module installations and uninstallations.
- ConfigInstaller::drupalGetProfile in core/
lib/ Drupal/ Core/ Config/ ConfigInstaller.php - Gets the install profile from settings.
File
- core/
lib/ Drupal/ Core/ Site/ Settings.php, line 85 - Contains \Drupal\Core\Site\Settings.
Class
- Settings
- Read only settings that are initialized with the class.
Namespace
Drupal\Core\SiteCode
public static function get($name, $default = NULL) {
return isset(self::$instance->storage[$name]) ? self::$instance->storage[$name] : $default;
}