Commit ad868197 authored by Jonathan Hunt's avatar Jonathan Hunt

53 Output richer attributes for included resources.

parent 30327c5b
......@@ -157,7 +157,6 @@ function _climbnz_api_entities_to_data_array($entities) {
* We don't want to expose all attributes to the world.
*/
function _climbnz_api_map_node_to_place($node, $parameters) {
flog_it(__FUNCTION__ . ': working with place nid=' . $node->nid . ', title=' . $node->title);
$endpoint_path = '/' . _climbnz_api_endpoint_path();
// Wrap place in Entity wrapper to ease access to fields.
......@@ -251,7 +250,7 @@ function _climbnz_api_map_node_to_place($node, $parameters) {
foreach ($included_resources_labels as $included_resource_label) {
if (!empty($included[$included_resource_label])) {
foreach ($included[$included_resource_label] as $included_resource) {
$output['included'][] = _climbnz_api_place_relation($included_resource);
$output['included'][] = _climbnz_api_map_node_to_place($included_resource, array('summary' => true));
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment