public static function ChartsDefaultSettings::transformBoolStringValueToBool in Charts 8.4
Same name and namespace in other branches
- 5.0.x src/Settings/ChartsDefaultSettings.php \Drupal\charts\Settings\ChartsDefaultSettings::transformBoolStringValueToBool()
Transform boolean strings value to real boolean.
Parameters
mixed $value: The value to be transformed.
Return value
bool|mixed The boolean value or the original passed value.
2 calls to ChartsDefaultSettings::transformBoolStringValueToBool()
- ChartsDefaultSettings::transformLegacySettingsToNew in src/
Settings/ ChartsDefaultSettings.php - Transforms legacy settings to newer ones.
- charts_highcharts_update_8400 in modules/
charts_highcharts/ charts_highcharts.install - Move the highcharts config to the main settings and plugin configuration.
File
- src/
Settings/ ChartsDefaultSettings.php, line 282
Class
- ChartsDefaultSettings
- The chart default settings instance.
Namespace
Drupal\charts\SettingsCode
public static function transformBoolStringValueToBool($value) {
if ($value === 'FALSE') {
$value = FALSE;
}
elseif ($value === 'TRUE') {
$value = TRUE;
}
return $value;
}