-
Notifications
You must be signed in to change notification settings - Fork 39
/
islandora_paged_content.api.php
61 lines (57 loc) · 1.8 KB
/
islandora_paged_content.api.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* @file
* This file documents all available hook functions to manipulate data.
*/
/**
* Identifies content models whose children are paged content.
*
* @note
* The children content model PIDs currently map to an empty array as there
* may be room for expansion in the future.
* @return array
* An array mapping the parent paged content model to an array of keyed
* content model arrays containing:
* - parents: An associative array mapping applicable content models to
* predicates by which the current entry might be related.
* Not strictly needed if it belongs to a collection.
* - children: An array containing arrays of keyed content model children.
*/
function hook_islandora_paged_content_content_model_registry() {
return array(
'somecmodel' => array(
'parents' => array(
'islandora:bookCModel' => 'isMemberOfCollection',
),
'children' => array(
'somecmodel' => array(),
),
),
);
}
/**
* Allows one to alter the page management tabs.
*
* @param array $manage_tabs
* The renderable array of tabs to alter.
* @param array $context
* An array containing the current object under the key 'object'.
*
* @see islandora_paged_content_manage_page_menu()
*/
function hook_islandora_paged_content_page_management_tabs_alter(&$manage_tabs, $context) {
unset($manage_tabs['manage_page']['pdf']);
}
/**
* Allows one to alter the paged content pages management tabs.
*
* @param array $manage_tabs
* The renderable array of tabs to alter.
* @param array $context
* An array containing the current object under the key 'object'.
*
* @see islandora_paged_content_manage_pages_menu()
*/
function hook_islandora_paged_content_pages_management_tabs_alter(&$manage_tabs, $context) {
unset($manage_tabs['manage_pages']['pdf']);
}