|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* This is the new Islandora Basic Image module.
|
|
|
|
*/
|
|
|
|
|
|
|
|
define('ISLANDORA_BASIC_IMAGE_CONTENT_TYPE', 'islandora_basic_image');
|
|
|
|
define('ISLANDORA_BASIC_IMAGE_RDF_TYPE', 'islandora:basic_image');
|
|
|
|
define('ISLANDORA_BASIC_IMAGE_MEDIUM_SIZE_FIELD', 'field_medium_size');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_node_info().
|
|
|
|
*/
|
|
|
|
function islandora_basic_image_node_info() {
|
|
|
|
return array(
|
|
|
|
ISLANDORA_BASIC_IMAGE_CONTENT_TYPE => array(
|
|
|
|
'name' => t("Basic Image"),
|
|
|
|
'base' => ISLANDORA_BASIC_IMAGE_CONTENT_TYPE,
|
|
|
|
'description' => t("A Drupal node modeling a basic image pcdm:Object"),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_form().
|
|
|
|
*/
|
|
|
|
function islandora_basic_image_form($node, array &$form_state) {
|
|
|
|
return node_content_form($node, $form_state);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_rdf_mapping().
|
|
|
|
*/
|
|
|
|
function islandora_basic_image_rdf_mapping() {
|
|
|
|
module_load_include('inc', 'islandora', 'include/rdf_mapping');
|
|
|
|
return islandora_get_default_rdf_mapping(ISLANDORA_BASIC_IMAGE_CONTENT_TYPE, ISLANDORA_BASIC_IMAGE_RDF_TYPE);
|
|
|
|
}
|