protected function PatternSettingTypeBase::getValue in UI Patterns Settings 8
Same name and namespace in other branches
- 8.2 src/Plugin/PatternSettingTypeBase.php \Drupal\ui_patterns_settings\Plugin\PatternSettingTypeBase::getValue()
Return value if set otherwise take the default value.
Parameters
mixed $value: The provided value.
Return value
string The value for this setting
7 calls to PatternSettingTypeBase::getValue()
- AttributesSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ AttributesSettingType.php - Returns the configuration form elements specific to this settings plugin..
- BooleanSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ BooleanSettingType.php - Returns the configuration form elements specific to this settings plugin..
- CheckboxSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ CheckboxSettingType.php - Returns the configuration form elements specific to this settings plugin..
- NumberSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ NumberSettingType.php - Returns the configuration form elements specific to this settings plugin..
- SelectSettingType::settingsForm in src/
Plugin/ UiPatterns/ SettingType/ SelectSettingType.php - Returns the configuration form elements specific to this settings plugin..
File
- src/
Plugin/ PatternSettingTypeBase.php, line 41
Class
- PatternSettingTypeBase
- Base class for UI Patterns Setting plugins.
Namespace
Drupal\ui_patterns_settings\PluginCode
protected function getValue($value) {
if ($value === NULL) {
return $this
->getPatternSettingDefinition()
->getDefaultValue();
}
else {
return $value === NULL ? "" : $value;
}
}