@ -223,6 +223,84 @@ function islandora_admin_paths() {
return $paths;
}
/**
* Implements hook_theme().
*
* @return array
*/
function islandora_theme() {
return array(
// default object template
'islandora_default' => array(
'file' => 'theme/islandora.theme.inc',
'template' => 'theme/islandora-object',
'variables' => array('islandora_object' => NULL),
),
// default edit page
'islandora_default_edit' => array(
'file' => 'theme/islandora.theme.inc',
'template' => 'theme/islandora-object-edit',
'variables' => array('islandora_object' => NULL),
),
// admin table for solution pack viewer selection
'islandora_viewers_table' => array(
'file' => 'includes/solution_packs.inc',
'render element' => 'form',
),
);
}
/**
* Implements hook_permission().
*
* @return array
*/
function islandora_permission() {
return array(
FEDORA_VIEW => array(
'title' => t('View repository objects and datastreams'),
'description' => t('View objects in the repository and their associated datastreams. Note: Fedora XACML security policies may override this permission.')
),
FEDORA_ADD_DS => array(
'title' => t('Add datastreams to repository objects'),
'description' => t('Add datastreams to objects in the repository. Note: Fedora XACML security policies may override this position.')
),
FEDORA_METADATA_EDIT => array(
'title' => t('Edit metadata'),
'description' => t('Edit metadata for objects in the repository.')
),
FEDORA_INGEST => array(
'title' => t('Create new repository objects'),
'description' => t('Create new objects in the repository.')
),
FEDORA_PURGE => array(
'title' => t('Permanently remove objects from the repository'),
'description' => t('Permanently remove objects from the repository.')
),
FEDORA_MODIFY_STATE => array(
'title' => t('Change repository object states'),
'description' => t('Change the state of objects in the repository (e.g. from Active to Inactive).')
),
FEDORA_MANAGE => array(
'title' => t('View object management tabs'),
'description' => t('View tabs that provide object management functions.')
)
);
}
/**
* Implements hook_forms().
*/
function islandora_forms($form_id) {
$forms = array();
if (strpos($form_id, 'islandora_solution_pack_form_') !== FALSE) {
$forms[$form_id] = array(
'callback' => 'islandora_solution_pack_form',
);
}
return $forms;
}
/**
* determines whether we can see the object or not
* checks PID namespace permissions, and user permissions
@ -408,64 +467,6 @@ function islandora_default_islandora_view_object($object) {
return array('Default output' => $output);
}
/**
* Implements hook_theme().
*
* @return array
*/
function islandora_theme() {
return array(
'islandora_default' => array(
'file' => 'theme/islandora.theme.inc',
'template' => 'theme/islandora-object',
'variables' => array('islandora_object' => NULL),
),
'islandora_default_edit' => array(
'file' => 'theme/islandora.theme.inc',
'template' => 'theme/islandora-object-edit',
'variables' => array('islandora_object' => NULL),
),
);
}
/**
* Implements hook_permission().
*
* @return array
*/
function islandora_permission() {
return array(
FEDORA_VIEW => array(
'title' => t('View repository objects and datastreams'),
'description' => t('View objects in the repository and their associated datastreams. Note: Fedora XACML security policies may override this permission.')
),
FEDORA_ADD_DS => array(
'title' => t('Add datastreams to repository objects'),
'description' => t('Add datastreams to objects in the repository. Note: Fedora XACML security policies may override this position.')
),
FEDORA_METADATA_EDIT => array(
'title' => t('Edit metadata'),
'description' => t('Edit metadata for objects in the repository.')
),
FEDORA_INGEST => array(
'title' => t('Create new repository objects'),
'description' => t('Create new objects in the repository.')
),
FEDORA_PURGE => array(
'title' => t('Permanently remove objects from the repository'),
'description' => t('Permanently remove objects from the repository.')
),
FEDORA_MODIFY_STATE => array(
'title' => t('Change repository object states'),
'description' => t('Change the state of objects in the repository (e.g. from Active to Inactive).')
),
FEDORA_MANAGE => array(
'title' => t('View object management tabs'),
'description' => t('View tabs that provide object management functions.')
)
);
}
/**
* A helper function to get a connection and return an object