forked from vejlebib/ding_eresource
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathding_eresource.module
More file actions
32 lines (29 loc) · 908 Bytes
/
ding_eresource.module
File metadata and controls
32 lines (29 loc) · 908 Bytes
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
<?php
/**
* @file
* Code for the Ding! E-resource feature.
*/
include_once 'ding_eresource.features.inc';
/**
* Implements hook_ctools_plugin_directory().
*
* It simply tells panels where to find the .inc files that define various
* args, contexts, content_types. In this case the subdirectories of
* ctools_plugin_example/panels are used.
*/
function ding_eresource_ctools_plugin_directory($module, $plugin) {
if ($module == 'ctools' && !empty($plugin)) {
return "plugins/$plugin";
}
}
/**
* Implements hook_form_alter().
*/
function ding_eresource_form_alter(&$form, &$form_state, $form_id) {
// Change all-text in select list in exposed filter for e-resources.
if ($form['#id'] == 'views-exposed-form-ding-eresource-ding-eresource-list') {
if (!empty($form['access']['#options']['All'])) {
$form['access']['#options']['All'] = t('Access: All e-materials');
}
}
}