function _hosting_site_list_class in Hostmaster (Aegir) 6
Define the classes that correspond to the site status.
See also
2 calls to _hosting_site_list_class()
- hosting_site_list_form in modules/
hosting/ site/ hosting_site.module - Create a form for building a list of sites. @TODO Add ability to filter by additional fields
- hosting_site_preprocess_views_view_table in modules/
hosting/ site/ hosting_site.module
File
- modules/
hosting/ site/ hosting_site.module, line 752
Code
function _hosting_site_list_class($node, $verified = null) {
$status = is_numeric($node) ? $node : $node->site_status;
static $classes = array(
HOSTING_SITE_QUEUED => "hosting-queue",
HOSTING_SITE_ENABLED => "hosting-success",
HOSTING_SITE_DELETED => "hosting-error",
HOSTING_SITE_DISABLED => "hosting-error",
);
if ($status == HOSTING_SITE_ENABLED && !$verified) {
return 'hosting-warning';
}
return $classes[$status];
}