public function MessageTemplate::getSetting in Message 8
Return a single setting by key.
Parameters
string $key: The key to return.
mixed $default_value: The default value to use in case the key is missing. Defaults to NULL.
Return value
mixed The value of the setting or the default value if none found.
Overrides MessageTemplateInterface::getSetting
File
- src/
Entity/ MessageTemplate.php, line 183
Class
- MessageTemplate
- Defines the Message template entity class.
Namespace
Drupal\message\EntityCode
public function getSetting($key, $default_value = NULL) {
if (isset($this->settings[$key])) {
return $this->settings[$key];
}
return $default_value;
}