function hosting_platform_drush_context_import in Hosting 7.3
Same name and namespace in other branches
- 6.2 platform/hosting_platform.drush.inc \hosting_platform_drush_context_import()
- 7.4 platform/hosting_platform.drush.inc \hosting_platform_drush_context_import()
Implements hook_drush_context_import().
File
- platform/
hosting_platform.drush.inc, line 29 - Implement drush hooks for the Platforms module.
Code
function hosting_platform_drush_context_import($context, &$node) {
if ($context->type == 'platform') {
if (!isset($node->title)) {
$node->title = str_replace('platform_', '', trim($context->name, '@'));
}
$node->web_server = hosting_context_nid($context->web_server);
$node->publish_path = $context->root;
$node->makefile = $context->makefile;
if (isset($context->make_working_copy) && !empty($context->make_working_copy)) {
$node->make_working_copy = $context->make_working_copy;
}
}
}