function cmis_browser_content_get in CMIS API 6.2
Same name and namespace in other branches
- 6.4 cmis_browser/cmis_browser.content_get.inc \cmis_browser_content_get()
- 6.3 cmis_browser/cmis_browser.content_get.inc \cmis_browser_content_get()
- 7.2 cmis_browser/cmis_browser.content_get.inc \cmis_browser_content_get()
- 7 cmis_browser/cmis_browser.content_get.inc \cmis_browser_content_get()
Build cmis_browser browse page.
2 string references to 'cmis_browser_content_get'
- cmis_browser_menu in cmis_browser/
cmis_browser.module - Implementation of hook_menu().
- _cmis_browser_content_get_document in cmis_browser/
cmis_browser.content_get.inc - CMIS document download handler.
File
- cmis_browser/
cmis_browser.content_get.inc, line 7
Code
function cmis_browser_content_get() {
module_load_include('api.inc', 'cmis');
module_load_include('utils.inc', 'cmis_browser');
// Invoke CMIS service
try {
$repository = cmisapi_getRepositoryInfo();
$object_id = _cmis_browser_content_object_id_from_request($repository);
$object = cmisapi_getProperties($repository->repositoryId, $object_id);
switch ($object->type) {
case 'document':
return _cmis_browser_content_get_document($repository, $object);
break;
case 'folder':
return _cmis_browser_content_get_folder($repository, $object, array_slice(explode('/', $_GET['q']), 2));
break;
default:
throw new CMISException(t('Unable to handle cmis object @object_id of type @object_type', array(
'@object_id' => $object->id,
'@object_type' => $object->type,
)));
}
} catch (CMISException $e) {
cmis_error_handler('cmis_browser', $e);
return '';
}
}