@ -223,6 +223,84 @@ function islandora_admin_paths() {
return $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
* determines whether we can see the object or not
* checks PID namespace permissions, and user permissions
* checks PID namespace permissions, and user permissions
if (strpos($form_id, 'islandora_solution_pack_form_') !== FALSE) {
$forms[$form_id] = array(
'callback' => 'islandora_solution_pack_form',
);
}
return $forms;
}
/**
/**
* a function to call other modules edit page. If there are not any modules
* a function to call other modules edit page. If there are not any modules
* that handle this function this module will build a default page.
* that handle this function this module will build a default page.
@ -408,71 +467,6 @@ function islandora_default_islandora_view_object($object) {
return array('Default output' => $output);
return array('Default output' => $output);
}
}
/**
* 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.')
)
);
}
/**
/**
* A helper function to get a connection and return an object
* A helper function to get a connection and return an object