function template_preprocess_status_property in Apigee Edge 8
Prepares variables for status_property templates.
Default template: status_property.html.twig.
Parameters
array $variables: An associative array.
File
- ./
apigee_edge.module, line 238 - Copyright 2018 Google Inc.
Code
function template_preprocess_status_property(array &$variables) {
$element =& $variables['element'];
$element['value'] = $element['#value'];
$classes = [
'status-value-' . Html::getClass($element['#value']),
];
if ($element['#indicator_status'] !== '') {
$classes[] = str_replace('_', '-', $element['#indicator_status']);
}
$element['attributes'] = new Attribute([
'class' => $classes,
]);
}