This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_permission(). | |
*/ | |
function islandora_fits_permission() { | |
return array( | |
'view technical metadata' => array( | |
'title' => 'View technical metadata', | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_theme(). | |
* Registers all theme hooks defined by this module. | |
*/ | |
function mymodule_theme() { | |
return array( | |
'mymodule_my_hello' => array( | |
'variables' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Theme callback. | |
* @param array $variables | |
*/ | |
function theme_mymodule_my_hello($variables) { | |
$title = $variables['title']; | |
// Create markup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_theme(). | |
* Registers all theme hooks defined by this module. | |
*/ | |
function mymodule_theme() { | |
return array( | |
'mymodule_my_hello' => array( | |
'variables' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Preprocess function to format and sanitize output before | |
* sending it to the template. | |
* | |
* @param array &$variables | |
*/ | |
function template_preprocess_mymodule_hello(&$variables) { | |
$variables['title'] = check_plain($variables['title']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:fedora="info:fedora/fedora-system:def/relations-external#" | |
xmlns:fedora-model="info:fedora/fedora-system:def/model#" | |
xmlns:islandora="http://islandora.ca/ontology/relsext#"> | |
<rdf:Description rdf:about="info:fedora/changeme:2"> | |
<fedora-model:hasModel rdf:resource="info:fedora/islandora:sp_basic_image"> | |
</fedora-model:hasModel> | |
<fedora:isMemberOfCollection rdf:resource="info:fedora/islandora:sp_basic_image_collection"> | |
</fedora:isMemberOfCollection> | |
</rdf:Description> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generate an object's display for the given content model. | |
* | |
* Content models PIDs have colons and hyphens changed to underscores, | |
* to create the hook name. | |
* | |
* @param AbstractObject $object | |
* A Tuque FedoraObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (islandora_datastream_access(FEDORA_VIEW_OBJECTS, | |
$islandora_object['DC'])) { | |
// Do something | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This hook allows modules to add default forms to form builder. | |
* | |
* @return array | |
* An associative array mapping unique names to associative arrays containing a | |
* single key: | |
* - form_file: A string containing the path to the form definition, relative | |
* to the webserver's document root (such that I might be opened |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_CMODEL_PID_islandora_object_ingested(). | |
*/ | |
function islandora_pdf_islandora_sp_pdf_islandora_object_ingested($object) { | |
module_load_include('inc', 'islandora_pdf', 'includes/derivatives'); | |
islandora_pdf_create_all_derivatives($object); | |
} |