|
|
|
|
@ -663,6 +663,31 @@ function islandora_print_object(AbstractObject $object) {
|
|
|
|
|
return theme('islandora_object_print', array('object' => $object)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* View print tab access. |
|
|
|
|
* |
|
|
|
|
* Configurable option in islandora configuration. |
|
|
|
|
* |
|
|
|
|
* @param string $op |
|
|
|
|
* String identifying an operation to check. Should correspond to a |
|
|
|
|
* permission declared via hook_permission(). |
|
|
|
|
* @param AbstractObject $object |
|
|
|
|
* An object to check for permissions. |
|
|
|
|
* |
|
|
|
|
* @return bool |
|
|
|
|
* TRUE if at least one implementation of hook_islandora_object_access() |
|
|
|
|
* returned TRUE, and no implementation return FALSE; FALSE otherwise, or |
|
|
|
|
* FALSE if 'islandora_show_print_option' is not selected in islandora |
|
|
|
|
* configuraton. |
|
|
|
|
*/ |
|
|
|
|
function islandora_print_object_access($op, $object) { |
|
|
|
|
$access = islandora_object_access($op, $object); |
|
|
|
|
if ($access && variable_get('islandora_show_print_option', FALSE)) { |
|
|
|
|
return $access; |
|
|
|
|
} |
|
|
|
|
return FALSE; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* View print tab access. |
|
|
|
|
* |
|
|
|
|
|