1 | <?php |
||
17 | class Filter extends Module |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * An array of HTML Purifier instances keyed by filter configuration hash |
||
22 | * @var array |
||
23 | */ |
||
24 | protected $htmlpurifiers = array(); |
||
25 | |||
26 | /** |
||
27 | * Constructor |
||
28 | */ |
||
29 | public function __construct() |
||
33 | |||
34 | /** |
||
35 | * Implements hook "library.list" |
||
36 | * @param array $libraries |
||
37 | */ |
||
38 | public function hookLibraryList(array &$libraries) |
||
57 | |||
58 | /** |
||
59 | * Implements hook "route.list" |
||
60 | * @param array $routes |
||
61 | */ |
||
62 | public function hookRouteList(array &$routes) |
||
78 | |||
79 | /** |
||
80 | * Implements hook "user.role.permissions" |
||
81 | * @param array $permissions |
||
82 | */ |
||
83 | public function hookUserRolePermissions(array &$permissions) |
||
88 | |||
89 | /** |
||
90 | * Implements hook "filter" |
||
91 | * @param string $text |
||
92 | * @param array $filter |
||
93 | * @param null|string $filtered |
||
94 | */ |
||
95 | public function hookFilter($text, $filter, &$filtered) |
||
101 | |||
102 | /** |
||
103 | * Filter a string |
||
104 | * @param string $text |
||
105 | * @param array $filter |
||
106 | * @return string |
||
107 | */ |
||
108 | public function filter($text, $filter) |
||
112 | |||
113 | /** |
||
114 | * Returns HTML Purifier class instance depending on the filter configuration |
||
115 | * @param array $filter |
||
116 | * @return \HTMLPurifier |
||
117 | */ |
||
118 | public function getHtmlpurifierInstance(array $filter) |
||
137 | |||
138 | /** |
||
139 | * Implements hook "filter.handlers" |
||
140 | * @param mixed $filters |
||
141 | */ |
||
142 | public function hookFilterHandlers(array &$filters) |
||
146 | |||
147 | /** |
||
148 | * Returns an array of filter handlers |
||
149 | * @return array |
||
150 | */ |
||
151 | protected function getFilterHandlers() |
||
162 | |||
163 | /** |
||
164 | * Implements hook "module.enable.after" |
||
165 | */ |
||
166 | public function hookModuleEnableAfter() |
||
170 | |||
171 | /** |
||
172 | * Implements hook "module.disable.after" |
||
173 | */ |
||
174 | public function hookModuleDisableAfter() |
||
178 | |||
179 | /** |
||
180 | * Implements hook "module.install.after" |
||
181 | */ |
||
182 | public function hookModuleInstallAfter() |
||
186 | |||
187 | /** |
||
188 | * Implements hook "module.uninstall.after" |
||
189 | */ |
||
190 | public function hookModuleUninstallAfter() |
||
195 | |||
196 | } |
||
197 |