Resource functions
- add_alternative_file
- copy_resource
- create_resource
- delete_alternative_file
- delete_comment
- delete_resource
- get_alternative_files
- get_edit_access
- get_related_resources
- get_resource_access
- get_resource_all_image_sizes
- get_resource_comments
- get_resource_data
- get_resource_field_data
- get_resource_log
- get_resource_path
- get_resource_types
- put_resource_data
- relate_all_resources
- replace_resource_file
- resource_file_readonly
- resource_log_last_rows
- upload_file
- upload_file_by_url
- upload_multipart
- update_related_resource
- update_resource_type
- get_resource_collections
- validate_upload_url
Collection functions
- get_user_collections
- add_resource_to_collection
- remove_resource_from_collection
- create_collection
- delete_collection
- search_public_collections
- get_collection
- save_collection
- show_hide_collection
- send_collection_to_admin
- get_featured_collections
- delete_resources_in_collection
- collection_add_resources
- collection_remove_resources
- get_collections_resource_count
- reorder_featured_collections
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions
- consentmanager_get_consents
- licensemanager_get_licenses
- consentmanager_get_consent
- consentmanager_delete_consent
- consentmanager_batch_link_unlink
- consentmanager_link_consent
- consentmanager_unlink_consent
- consentmanager_create_consent
- consentmanager_update_consent
- consentmanager_get_all_consents
- consentmanager_get_all_consents_by_collection
- consentmanager_save_file
- faces_set_node
Share functions
Tab functions
Dash functions
get_resource_comments
Retrieve comments for the specified resource reference.
* Available from version 11.0.
| Variable | Description | Data type |
|---|---|---|
| $resource_ref * | Resource ID | integer |
|
$flat_view
|
Return in order of creation, newest first. By default false to use tree view. | bool |
Return values
Array of comments will be returned in tree view layout by default. Top level comments will appear first with comments at lower levels displayed most recent first while respecting hierarchy of responses. It is also possible to request the comments as a flat list ordered most recent first. In most cases, using the same layout as system config $comments_flat_view is recommended.
An empty array maybe returned if the user doesn't have permission to view the resource or resource commenting is disabled in the system.