You are here

function hosting_hosting_platform_context_options in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 platform/hosting_platform.drush.inc \hosting_hosting_platform_context_options()
  2. 7.4 platform/hosting_platform.drush.inc \hosting_hosting_platform_context_options()

Implements hook_hosting_TASK_OBJECT_context_options().

File

platform/hosting_platform.drush.inc, line 10
Implement drush hooks for the Platforms module.

Code

function hosting_hosting_platform_context_options(&$task) {
  $task->context_options['server'] = '@server_master';
  $task->context_options['web_server'] = hosting_context_name($task->ref->web_server);

  // Trim the path so we dont pass extra spaces.
  $task->context_options['root'] = trim($task->ref->publish_path, " ");
  if ($task->ref->makefile) {
    $task->context_options['makefile'] = $task->ref->makefile;
  }
  if (isset($task->ref->make_working_copy) && !empty($task->ref->make_working_copy)) {
    $task->context_options['make_working_copy'] = $task->ref->make_working_copy;
  }
  else {
    $task->context_options['make_working_copy'] = 'null';
  }
}