public function Theme::getSetting in Express 8
Retrieves a theme setting.
Parameters
string $name: The name of the setting to be retrieved.
mixed $default: A default value to provide if the setting is not found or if the plugin does not have a "defaultValue" annotation key/value pair. Typically, you will likely never need to use this unless in rare circumstances where the setting plugin exists but needs a default value not able to be set by conventional means (e.g. empty array).
Return value
mixed The value of the requested setting, NULL if the setting does not exist and no $default value was provided.
See also
3 calls to Theme::getSetting()
- Theme::getPendingUpdates in themes/
contrib/ bootstrap/ src/ Theme.php - Retrieves pending updates for the theme.
- Theme::getProvider in themes/
contrib/ bootstrap/ src/ Theme.php - Retrieves the CDN provider.
- Theme::__construct in themes/
contrib/ bootstrap/ src/ Theme.php - Theme constructor.
File
- themes/
contrib/ bootstrap/ src/ Theme.php, line 530 - Contains \Drupal\bootstrap.
Class
- Theme
- Defines a theme object.
Namespace
Drupal\bootstrapCode
public function getSetting($name, $default = NULL) {
$value = $this
->settings()
->get($name);
return !isset($value) ? $default : $value;
}