This repository has been archived by the owner on Aug 17, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
campkitlite_core.module
57 lines (53 loc) · 1.86 KB
/
campkitlite_core.module
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
<?php
/**
* @file
* All hooks into core and contrib are defined here.
*/
/**
* All hooks should be either very short or extracted out into includes.
*/
/**
* Implements hook_ctools_plugin_directory().
*
* We supply basic structure for both layouts and styles
* so that we can reuse the layouts and styles.
*
* It is possible to overwrite the theme function for both
* layouts and styles in the theme hence we are only
* doing very basic markup and styling here.
*
*/
function campkitlite_core_ctools_plugin_directory($module, $plugin) {
$plugins = array('layouts', 'styles');
if (in_array($plugin, $plugins)) {
return 'plugins/' . $plugin;
}
}
function campkitlite_core_entity_info_alter(&$entity_info) {
// Sessions
$entity_info['fieldable_panels_pane']['bundles']['session'] = array(
'label' => t('Add session'),
'pane category' => t('Custom'),
'pane top level' => TRUE,
'pane icon' => drupal_get_path('module', 'campkitlite_core') . '/images/session.png',
'admin' => array(
'path' => 'admin/structure/fieldable-panels-panes/manage/%fieldable_panels_panes_type',
'bundle argument' => 4,
'real path' => 'admin/structure/fieldable-panels-panes/manage/session',
'access arguments' => array('administer fieldable panels panes'),
),
);
// Sponsors
$entity_info['fieldable_panels_pane']['bundles']['sponsor'] = array(
'label' => t('Add sponsor'),
'pane category' => t('Custom'),
'pane top level' => TRUE,
'pane icon' => drupal_get_path('module', 'campkitlite_core') . '/images/sponsor.png',
'admin' => array(
'path' => 'admin/structure/fieldable-panels-panes/manage/%fieldable_panels_panes_type',
'bundle argument' => 4,
'real path' => 'admin/structure/fieldable-panels-panes/manage/sponsor',
'access arguments' => array('administer fieldable panels panes'),
),
);
}