function taxonomy_service_select_nodes in Services 6.3
Same name and namespace in other branches
- 5 services/taxonomy_service/taxonomy_service.module \taxonomy_service_select_nodes()
- 6 services/taxonomy_service/taxonomy_service.inc \taxonomy_service_select_nodes()
- 6.2 services/taxonomy_service/taxonomy_service.inc \taxonomy_service_select_nodes()
- 7.3 resources/taxonomy_resource.inc \taxonomy_service_select_nodes()
- 7 services/taxonomy_service/taxonomy_service.inc \taxonomy_service_select_nodes()
Services interface to taxonomy_select_nodes().
Note that where taxonomy_select_nodes() returns the results of a db_query(), this function returns an array of node objects.
Return value
An array of node objects.
See also
1 string reference to 'taxonomy_service_select_nodes'
- _taxonomy_resource_definition in resources/
taxonomy_resource.inc - @file Link general taxonomy functionalities to services module.
File
- resources/
taxonomy_resource.inc, line 580 - Link general taxonomy functionalities to services module.
Code
function taxonomy_service_select_nodes($tids, $fields, $operator, $depth, $pager, $order) {
if (!is_array($tids)) {
$tids = explode(',', $tids);
}
if (!is_array($fields)) {
$fields = explode(',', $fields);
}
$result = taxonomy_select_nodes($tids, $operator, $depth, $pager, $order);
while ($node = db_fetch_object($result)) {
$nodes[] = services_node_load(node_load($node->nid), $fields);
}
if (empty($nodes)) {
return services_error('No nodes were found with tid(s): ' . implode(",", $tids), 404);
}
return $nodes;
}