Drupal modules for browsing and managing Fedora-based digital repositories.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
1.2 KiB

<?php
/**
* @file
* Provides a service for adding thumbnails to Drupal.
*/
/**
* Implements hook_permission().
*/
function islandora_tn_service_permission() {
return array(
'islandora tn service create' => array(
'title' => t('Add Thumbnails'),
'description' => t('Allows external sources to add thumbnails to nodes.'),
),
);
}
/**
* Implements hook_services_resources().
*/
function islandora_tn_service_services_resources() {
return array(
'tn' => array(
'create' => array(
'help' => t('Adds a thumbnail to the node identified by UUID.'),
'file' => array(
'type' => 'inc',
'module' => 'islandora_tn_service',
'name' => 'include/islandora_tn_service',
),
'callback' => 'islandora_tn_service_create',
'access callback' => 'user_access',
'access arguments' => array('islandora tn service create'),
'args' => array(
array(
'name' => 'args',
'type' => 'array',
'description' => t("JSON data containing arguments to add the thumbnail."),
'source' => 'data',
'optional' => FALSE,
),
),
),
),
);
}