You are here

function hosting_web_server_view in Hosting 5

Implementation of hook_view().

File

web_server/hosting_web_server.module, line 347
Web server node type is defined here.

Code

function hosting_web_server_view($node, $teaser = FALSE, $page = FALSE) {
  $node = node_prepare($node, $teaser);
  $node->content['info'] = array(
    '#prefix' => '<div id="hosting-webserver-info">',
    '#suffix' => '</div>',
  );
  if ($node->ip_address) {
    $node->content['info']['ip_address'] = array(
      '#type' => 'item',
      '#title' => t('IP address'),
      '#value' => filter_xss($node->ip_address),
    );
  }
  $node->content['info']['drush_path'] = array(
    '#type' => 'item',
    '#title' => t('Drush path'),
    '#value' => filter_xss($node->drush_path),
  );
  $node->content['info']['script_user'] = array(
    '#type' => 'item',
    '#title' => t('Script user'),
    '#value' => filter_xss($node->script_user),
  );
  $node->content['info']['web_group'] = array(
    '#type' => 'item',
    '#title' => t('Web server group'),
    '#value' => filter_xss($node->web_group),
  );
  $node->content['info']['config_path'] = array(
    '#type' => 'item',
    '#title' => t('Configuration path'),
    '#value' => filter_xss($node->config_path),
  );
  $node->content['info']['backup_path'] = array(
    '#type' => 'item',
    '#title' => t('Backup path'),
    '#value' => filter_xss($node->backup_path),
  );
  $node->content['info']['restart_cmd'] = array(
    '#type' => 'item',
    '#title' => t('Restart command'),
    '#value' => filter_xss($node->restart_cmd),
  );
  return $node;
}