protected static function ScssFontFamily::cleanValue in SCSS Compiler 1.0.x
Cleans a value for use in element production & storage.
Parameters
mixed $value: The value to clean.
Return value
array|null A zero-indexed array of element values.
2 calls to ScssFontFamily::cleanValue()
- ScssFontFamily::getValue in src/
Element/ ScssFontFamily.php - Attempt to extract the value of the supplied element.
- ScssFontFamily::valueCallback in src/
Element/ ScssFontFamily.php - Determines how user input is mapped to an element's #value property.
File
- src/
Element/ ScssFontFamily.php, line 81
Class
- ScssFontFamily
- A form element to represent font families.
Namespace
Drupal\compiler_scss\ElementCode
protected static function cleanValue($value) {
// Only allow an array of element delta values.
if (is_array($value) && ($value = array_filter($value, 'strlen'))) {
return array_values(array_filter($value, 'is_int', ARRAY_FILTER_USE_KEY));
}
return NULL;
}