You are here

function hosting_context_name in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 hosting.module \hosting_context_name()
  2. 7.3 hosting.module \hosting_context_name()

Return the hosting context name for a node.

Parameters

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

Return value

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

6 calls to hosting_context_name()
drush_hosting_clone_pre_hosting_task in clone/hosting_clone.drush.inc
@file Drush include for the site cloning module.
drush_hosting_migrate_pre_hosting_task in migrate/hosting_migrate.drush.inc
@file Implement drush hooks for the hosting migrate module.
hook_hosting_TASK_OBJECT_context_options in ./hosting.api.php
Add or change context options before a hosting task runs.
hosting_cron_queue in cron/hosting_cron.module
Implementation of hosting_QUEUE_TYPE_queue().
hosting_hosting_platform_context_options in platform/hosting_platform.drush.inc
Implementation of hook_hosting_TASK_OBJECT_context_options().

... See full list

3 string references to 'hosting_context_name'
hostingService_dns_master::context_options in dns/hosting_dns.service.inc
hostingService_http_cluster::context_options in web_cluster/hosting_web_cluster.service.inc
hostingService_http_pack::context_options in web_pack/hosting_web_pack.service.inc

File

./hosting.module, line 913
Hosting module.

Code

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;
}