You are here

function hosting_db_server_view in Hosting 5

Implementation of hook_view().

File

db_server/hosting_db_server.module, line 219

Code

function hosting_db_server_view($node, $teaser = FALSE, $page = FALSE) {
  $node = node_prepare($node, $teaser);
  $node->content['info'] = array(
    '#prefix' => '<div id="hosting-dbserver-info">',
    '#suffix' => '</div>',
  );
  $node->content['info']['db_type'] = array(
    '#type' => 'item',
    '#title' => t('Database type'),
    '#value' => $node->db_type,
  );
  $node->content['info']['db_user'] = array(
    '#type' => 'item',
    '#title' => t('Database user'),
    '#value' => filter_xss($node->db_user),
  );
  $node->content['sites_view'] = array(
    '#type' => 'item',
    '#value' => hosting_site_list("db_server", $node->nid),
    '#prefix' => '<div id="hosting-site-list">',
    '#suffix' => '</div>',
    '#weight' => 10,
  );
  return $node;
}