-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdic.module
78 lines (65 loc) · 1.58 KB
/
dic.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
require_once dirname(__FILE__) . '/dic.helper.inc';
/**
* Retrieve the container
*
* @return \Symfony\Component\DependencyInjection\ContainerInterface
*/
function drupal_dic() {
return _dic_get_helper()->getContainer();
}
/**
* Implements @see hook_flush_caches().
*/
function dic_flush_caches() {
_dic_get_helper()->flushCaches();
return array();
}
/**
* Implements @see hook_modules_installed().
*/
function dic_modules_installed(array $modules) {
dic_flush_caches();
// refresh bundle info cache
_dic_get_bundle_info(false);
}
/**
* Implements @see hook_modules_installed().
*/
function dic_modules_uninstalled(array $modules) {
dic_modules_installed($modules);
}
/**
* Implements @see hook_modules_enabled().
*/
function dic_modules_enabled(array $modules) {
dic_modules_installed($modules);
}
/**
* Implements @see hook_modules_disabled().
*/
function dic_modules_disabled($modules) {
dic_modules_installed($modules);
}
/**
* Implementation of @see hook_menu()
*/
function dic_menu() {
$items = array();
$items['admin/config/development/dic'] = array(
'title' => 'Dependency Injection',
'description' => "Configure Dependency Injection settings.",
'page callback' => 'drupal_get_form',
'page arguments' => array('dic_admin_settings_form'),
'access arguments' => array('administer dic'),
'weight' => 10,
'file' => 'dic.admin.inc',
);
return $items;
}
/**
* Implementation of @see hook_dic_bundle_info()
*/
function dic_dic_bundle_info() {
return array('bundles' => array("\\Drupal\\Dic\\Bundle\\DicBundle\\DicBundle"));
}