function hosting_site_views_data in Hostmaster (Aegir) 6
Implements hook_views_data().
File
- modules/
hosting/ site/ hosting_site.views.inc, line 11 - Hosting site views integration.
Code
function hosting_site_views_data() {
$data['hosting_site']['table'] = array(
'group' => 'Hosting Site',
'title' => 'Site',
'join' => array(
'node' => array(
'left_field' => 'vid',
'field' => 'vid',
),
),
);
$data['hosting_site']['client'] = array(
'title' => t('Client'),
'help' => t('Relate a node revision to the user who created the revision.'),
'relationship' => array(
'handler' => 'views_handler_relationship',
'base' => 'node',
'field' => 'nid',
'label' => t('client'),
),
);
$data['hosting_site']['db_server'] = array(
'title' => t('Database Server'),
'help' => t('Database where the site is installed.'),
'relationship' => array(
'handler' => 'views_handler_relationship',
'base' => 'node',
'field' => 'nid',
'label' => t('db server'),
),
);
$data['hosting_site']['profile'] = array(
'title' => t('Install Profile'),
'help' => t('Type of drupal site.'),
'relationship' => array(
'handler' => 'views_handler_relationship',
'base' => 'node',
'field' => 'nid',
'label' => t('profile'),
),
);
$data['hosting_site']['platform'] = array(
'title' => t('Platform'),
'help' => t('Platform'),
'relationship' => array(
'handler' => 'views_handler_relationship',
'base' => 'node',
'field' => 'nid',
'label' => t('platform'),
),
);
$data['hosting_site']['verified'] = array(
'title' => t('Verified'),
'help' => t('The last date verified task run on this site.'),
'field' => array(
'handler' => 'hosting_views_field_handler_interval',
'click sortable' => TRUE,
),
);
$data['hosting_site']['last_cron'] = array(
'title' => t('Last Cron Run'),
'help' => t('The time the last cron run was executed on this site.'),
'field' => array(
'handler' => 'hosting_views_field_handler_interval',
'click sortable' => TRUE,
),
);
$data['hosting_site']['language'] = array(
'title' => t('Language'),
'help' => t('The default language of this site.'),
'field' => array(
'handler' => 'views_handler_field_hosting_language',
'click sortable' => TRUE,
),
);
$data['hosting_site']['status'] = array(
'title' => t('Status'),
'help' => t('The current state of this site.'),
'field' => array(
'handler' => 'views_handler_field_hosting_site_status',
),
'filter' => array(
'handler' => 'views_handler_filter_numeric',
),
);
return $data;
}