You are here

function hosting_server_views_data in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 server/includes/views/hosting_server.views.inc \hosting_server_views_data()
  2. 7.3 server/includes/views/hosting_server.views.inc \hosting_server_views_data()

Implements hook_views_data().

File

server/hosting_server.views.inc, line 10
Hosting server views integration.

Code

function hosting_server_views_data() {
  $data['hosting_service']['table'] = array(
    'group' => 'Hosting Server',
    'title' => 'Server',
    'join' => array(
      'node' => array(
        'left_field' => 'vid',
        'field' => 'vid',
      ),
    ),
  );
  $data['hosting_service']['service'] = array(
    'title' => t('Service'),
    'help' => t('The type of service.'),
    'field' => array(
      'handler' => 'views_handler_field',
      'click sortable' => TRUE,
    ),
  );
  $data['hosting_service']['type'] = array(
    'title' => t('Type'),
    'help' => t('The service sub-type.'),
    'field' => array(
      'handler' => 'views_handler_field',
      'click sortable' => TRUE,
    ),
  );
  $data['hosting_service']['restart_cmd'] = array(
    'title' => t('Restart command'),
    'help' => t('The restart command for the service.'),
    'field' => array(
      'handler' => 'views_handler_field',
      'click sortable' => TRUE,
    ),
  );
  $data['hosting_service']['port'] = array(
    'title' => t('Port'),
    'help' => t('The port for the service.'),
    'field' => array(
      'handler' => 'views_handler_field_numeric',
      'click sortable' => TRUE,
    ),
  );
  $data['hosting_service']['available'] = array(
    'title' => t('Available'),
    'help' => t('Whether the service is available.'),
    'field' => array(
      'handler' => 'views_handler_field_boolean',
      'click sortable' => TRUE,
    ),
  );
  return $data;
}