You are here

function views_service_export in Services 6

Same name and namespace in other branches
  1. 6.2 services/views_service/views_service.inc \views_service_export()
  2. 7 services/views_service/views_service.inc \views_service_export()

Export a view.

Parameters

view_name: String. The views name.

Return value

Array. The view object.

1 string reference to 'views_service_export'
views_service_service in services/views_service/views_service.module
Implementation of hook_service().

File

services/views_service/views_service.inc, line 58
@author Services Dev Team

Code

function views_service_export($view_name) {
  $view = views_get_view($view_name);
  if (empty($view)) {
    return services_error('View does not exist.');
  }
  return $view
    ->export();
}