function hosting_context_name in Hosting 7.4
Same name and namespace in other branches
- 6.2 hosting.module \hosting_context_name()
- 7.3 hosting.module \hosting_context_name()
Return the hosting context name for a node.
Parameters
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.
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 - Implements hosting_QUEUE_TYPE_queue().
- hosting_hosting_platform_context_options in platform/
hosting_platform.drush.inc - Implements hook_hosting_TASK_OBJECT_context_options().
2 string references to 'hosting_context_name'
File
- ./
hosting.module, line 1272 - 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;
}