function settings

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.

Return value

\Drupal\Component\Utility\Settings The settings object.

22 string references to 'settings'
AjaxCommandsUnitTest::testSettingsCommand in drupal/core/modules/system/lib/Drupal/system/Tests/Ajax/AjaxCommandsUnitTest.php
Tests that SettingsCommand objects can be constructed and rendered.
ajax_command_settings in drupal/core/includes/ajax.inc
Creates a Drupal Ajax 'settings' command.
Block::getExportProperties in drupal/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
Overrides \Drupal\Core\Config\Entity\ConfigEntityBase::getExportProperties();
Block::label in drupal/core/modules/block/lib/Drupal/block/Plugin/Core/Entity/Block.php
Overrides \Drupal\Core\Entity\Entity::label();
BlockFormController::form in drupal/core/modules/block/lib/Drupal/block/BlockFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::form().

... See full list

File

drupal/core/includes/bootstrap.inc, line 837
Functions that need to be loaded on every Drupal request.

Code

function settings() {
  return Settings::getSingleton();
}