function hosting_platform_git_drush_context_import in Aegir Deploy 7.3
Implements hook_drush_context_import().
File
- modules/
platform_git/ hosting_platform_git.drush.inc, line 24 - Provision hooks to store data in the platform context/alias.
Code
function hosting_platform_git_drush_context_import($context, &$node) {
if ($context->type == 'platform') {
foreach ([
'git_repository_url',
'git_repository_path',
'git_reference',
] as $option) {
if (isset($context->{$option}) && !empty($context->{$option})) {
$field = 'field_' . $option;
$node->{$field}[$node->language][0]['value'] = $context->{$option};
}
}
}
}