function theme_views_maintenance_view_storage in Views Maintenance 7
Same name and namespace in other branches
- 6 theme/theme.inc \theme_views_maintenance_view_storage()
Returns HTML for view storage type.
Parameters
array $vars:
Return value
string
1 theme call to theme_views_maintenance_view_storage()
- template_preprocess_views_maintenance_views_table in theme/
theme.inc - Prepares views info for output and includes required CSS/JS.
File
- theme/
theme.inc, line 243 - Preprocessing and theming functions for Views Maintenance.
Code
function theme_views_maintenance_view_storage($vars) {
// Convert storage type to our format and add class to highlight it.
switch ($vars['type']) {
case t('Default'):
$storage = t('In code');
$class = "ok";
break;
case t('Overridden'):
$storage = $vars['type'];
$class = "error";
break;
default:
//t('Normal')
$storage = t('Database');
$class = "warning";
break;
}
return '<span class="' . $class . '">' . $storage . '</span>';
}