function _comment_resource_retrieve in Services 7.3
Same name and namespace in other branches
- 6.3 resources/comment_resource.inc \_comment_resource_retrieve()
Returns a specified comment
Parameters
$cid: Unique identifier for the specified comment
Return value
The comment object
1 string reference to '_comment_resource_retrieve'
- _comment_resource_definition in resources/
comment_resource.inc
File
- resources/
comment_resource.inc, line 247
Code
function _comment_resource_retrieve($cid) {
$comment = comment_load($cid);
return $comment ? services_field_permissions_clean('view', 'comment', $comment) : services_error(t('Comment @cid not found', array(
'@cid' => $cid,
)), 404);
}