You are here

function views_deploy in Deploy - Content Staging 6

Same name and namespace in other branches
  1. 5 views_deploy/views_deploy.module \views_deploy()

Implementation of hook_deploy().

Parameters

$view_name: Name of the view we're going to deploy.

Return value

The results of our remote call.

File

modules/views_deploy/views_deploy.module, line 43
Deployment API which enables modules to deploy items between servers.

Code

function views_deploy($view_name) {
  $view = views_get_view($view_name);
  if (is_null($view)) {
    drupal_set_message(t("View {$view_name} does not exist."));
  }
  return deploy_send(array(
    'views.import',
  ), array(
    $view
      ->export(),
    $view_name,
  ));
}