You are here

function _hosting_server_preprocess_classes in Hosting 7.4

Same name and namespace in other branches
  1. 7.3 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 907

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] .= empty($rows[$index][$field_label]) ? ' hosting-service-none' : ' hosting-service-available';
      }
    }
  }
}