if (isset($supported_models[$model][ISLANDORA_VIEW_HOOK]) && $supported_models[$model][ISLANDORA_VIEW_HOOK] == TRUE) {//another module is handling the view
return;
foreach ($object->models as $model) {
if (isset($supported_models[$model][ISLANDORA_VIEW_HOOK]) && $supported_models[$model][ISLANDORA_VIEW_HOOK] == TRUE) {//another module is handling the view
return;
}
}
}
}
/**
* Theme registry function
* @return array
*/
function islandora_theme() {
return array(
'islandora_default' => array(
'template' => 'islandora-object',
'variables' => array('islandora_object' => NULL),
),
'islandora_default_edit' => array(
'template' => 'islandora-object-edit',
'variables' => array('islandora_object' => NULL),
),
);
}
/**
* drupal hook_permissions function
* @return array
*/
function islandora_permission() {
return array(
FEDORA_VIEW => array(
'title' => t('View Fedora Repository objects and datastreams'),
'description' => t('Users with this permission will be allowed to view Fedora objects and datastreams. Unless Fedora XACML security policies limits this functionality to certain objects.')
),
FEDORA_ADD_DS => array(
'title' => t('Add Fedora streams to Fedora objects'),
'description' => t('Users with this permission will be allowed to add datastreams to Fedora objects. Unless Fedora XACML security policies limits this functionality to certain objects.')
),
FEDORA_METADATA_EDIT => array(
'title' => t('Edit Fedora Metadata'),
'description' => t('Users with this permission will be allowed to edit Fedora Metadata streams')
),
FEDORA_INGEST => array(
'title' => t('Create new Fedora objects'),
'description' => t('Users with this permission will be allowed to create new objects in the Fedora repository')
),
FEDORA_PURGE => array(
'title' => t('Permanently remove objects from the Fedora repository'),
'description' => t('Users with this permission will be allowed to Permantly remove objects from the Fedora repository.')
),
FEDORA_MODIFY_STATE => array(
'title' => t('Change a Fedora objects state'),
'description' => t('Users with this permission will be allowed to change a Fedora objects state.')
),
);
}
/**
*
* @param string $object_id
* @return type
*/
function islandora_add_datastream($object_id) {
if (!isset($object_id)) {
drupal_set_message(t('Cannot add datastream to object, object id not set'));
return;
/**
* Theme registry function
* @return array
*/
function islandora_theme() {
return array(
'islandora_default' => array(
'template' => 'islandora-object',
'variables' => array('islandora_object' => NULL),
),
'islandora_default_edit' => array(
'template' => 'islandora-object-edit',
'variables' => array('islandora_object' => NULL),
),
);
}
//send message to synapse
$object = new IslandoraObject($object_id);
if (!isset($object)) {
drupal_set_message(t('Could not remove object, object not found'));
return;
/**
* drupal hook_permissions function
* @return array
*/
function islandora_permission() {
return array(
FEDORA_VIEW => array(
'title' => t('View Fedora Repository objects and datastreams'),
'description' => t('Users with this permission will be allowed to view Fedora objects and datastreams. Unless Fedora XACML security policies limits this functionality to certain objects.')
),
FEDORA_ADD_DS => array(
'title' => t('Add Fedora streams to Fedora objects'),
'description' => t('Users with this permission will be allowed to add datastreams to Fedora objects. Unless Fedora XACML security policies limits this functionality to certain objects.')
),
FEDORA_METADATA_EDIT => array(
'title' => t('Edit Fedora Metadata'),
'description' => t('Users with this permission will be allowed to edit Fedora Metadata streams')
),
FEDORA_INGEST => array(
'title' => t('Create new Fedora objects'),
'description' => t('Users with this permission will be allowed to create new objects in the Fedora repository')
),
FEDORA_PURGE => array(
'title' => t('Permanently remove objects from the Fedora repository'),
'description' => t('Users with this permission will be allowed to Permantly remove objects from the Fedora repository.')
),
FEDORA_MODIFY_STATE => array(
'title' => t('Change a Fedora objects state'),
'description' => t('Users with this permission will be allowed to change a Fedora objects state.')
),
);
}
module_invoke_all('islandora_add_datastream', $object); //allow submodules to handle add datastream based on object type
}
function islandora_preprocess_islandora_default(&$variables) {