function hosting_package_view in Hostmaster (Aegir) 6
Implementation of hook_view().
File
- modules/
hosting/ package/ hosting_package.module, line 301
Code
function hosting_package_view($node, $teaser = FALSE, $page = FALSE) {
hosting_set_breadcrumb($node);
$node->content['info']['#prefix'] = '<div id="hosting-package-info">';
$node->content['info']['package_type'] = array(
'#type' => 'item',
'#title' => t('Package Type'),
'#value' => filter_xss($node->package_type),
);
$node->content['info']['short_name'] = array(
'#type' => 'item',
'#title' => t('Project Name'),
'#value' => filter_xss($node->short_name),
);
if (!empty($node->old_short_name)) {
$node->content['info']['old_short_name'] = array(
'#type' => 'item',
'#title' => t('Previous Project Name'),
'#value' => filter_xss($node->old_short_name),
);
}
$node->content['info']['#suffix'] = '</div>';
if ($node->package_type == 'profile') {
$node->content['sites_view'] = array(
'#type' => 'item',
'#value' => drupal_get_form('hosting_site_list_form', 'profile', $node->nid),
'#prefix' => '<div id="hosting-site-list">',
'#suffix' => '</div>',
'#weight' => 10,
);
}
return $node;
}