function hosting_context_name

7.x-3.x hosting.module hosting_context_name($nid)

Return the hosting context name for a node.


int $nid: The nid of the node to get the provision context name for.

Return value

string|bool The provision context name associated with the specified node, will be prefixed with '@' or FALSE if node doesnt exist.


./hosting.module, line 1163
Hosting module.


function hosting_context_name($nid) {
  $node = node_load($nid);
  if (!$node) {
    drupal_set_message(t('Error: cannot load node id %nid to find its context', array('%nid' => $nid)), 'error');
    return FALSE;
  return '@' . $node->hosting_name;