You are here

function taxonomy_service_get_tree in Services 6.3

Same name and namespace in other branches
  1. 5 services/taxonomy_service/taxonomy_service.module \taxonomy_service_get_tree()
  2. 6 services/taxonomy_service/taxonomy_service.inc \taxonomy_service_get_tree()
  3. 6.2 services/taxonomy_service/taxonomy_service.inc \taxonomy_service_get_tree()
  4. 7.3 resources/taxonomy_resource.inc \taxonomy_service_get_tree()
  5. 7 services/taxonomy_service/taxonomy_service.inc \taxonomy_service_get_tree()

Services interface to taxonomy_get_tree().

See also

taxonomy_get_tree()

1 string reference to 'taxonomy_service_get_tree'
_taxonomy_resource_definition in resources/taxonomy_resource.inc
@file Link general taxonomy functionalities to services module.

File

resources/taxonomy_resource.inc, line 562
Link general taxonomy functionalities to services module.

Code

function taxonomy_service_get_tree($vid, $parent = 0, $max_depth = NULL) {
  $terms = taxonomy_get_tree($vid, $parent, -1, $max_depth);
  if (empty($terms)) {
    return services_error('No vocabulary with id: ' . $vid . ' found.', 404);
  }
  return $terms;
}