function _hosting_server_preprocess_classes in Hosting 7.3
Same name and namespace in other branches
- 7.4 server/hosting_server.module \_hosting_server_preprocess_classes()
Add our service availability classes.
1 call to _hosting_server_preprocess_classes()
- hosting_server_preprocess in server/
hosting_server.module - Implements hook_preprocess().
File
- server/
hosting_server.module, line 911
Code
function _hosting_server_preprocess_classes(&$classes, $rows) {
foreach ($classes as $field_label => $field_row) {
if (is_numeric($field_label)) {
foreach ($field_row as $index => $field_classes) {
$classes[$field_label][$index] .= $rows[$index][$field_label] == 'no' ? ' hosting-service-unavailable' : ' hosting-service-available';
}
}
}
}