1 | <?php |
||
21 | class ext extends \phpbb\extension\base |
||
22 | { |
||
23 | /** |
||
24 | * Check whether or not the extension can be enabled. |
||
25 | * The current phpBB version should meet or exceed |
||
26 | * the minimum version required by this extension: |
||
27 | * |
||
28 | * Requires phpBB 3.2.0 due to the revised notifications system |
||
29 | * and new group helper. Requires PHP 5.5 due to array_column(). |
||
30 | * |
||
31 | * @return bool |
||
32 | * @access public |
||
33 | */ |
||
34 | public function is_enableable() |
||
38 | |||
39 | protected function check_phpbb_version() |
||
43 | |||
44 | protected function check_php_version() |
||
48 | |||
49 | /** |
||
50 | * Overwrite enable_step to enable Auto Groups notifications |
||
51 | * before any included migrations are installed. |
||
52 | * |
||
53 | * @param mixed $old_state State returned by previous call of this method |
||
54 | * @return mixed Returns false after last step, otherwise temporary state |
||
55 | * @access public |
||
56 | */ |
||
57 | public function enable_step($old_state) |
||
79 | |||
80 | /** |
||
81 | * Overwrite disable_step to disable Auto Groups notifications |
||
82 | * before the extension is disabled. |
||
83 | * |
||
84 | * @param mixed $old_state State returned by previous call of this method |
||
85 | * @return mixed Returns false after last step, otherwise temporary state |
||
86 | * @access public |
||
87 | */ |
||
88 | public function disable_step($old_state) |
||
110 | |||
111 | /** |
||
112 | * Overwrite purge_step to purge Auto Groups notifications before |
||
113 | * any included and installed migrations are reverted. |
||
114 | * |
||
115 | * @param mixed $old_state State returned by previous call of this method |
||
116 | * @return mixed Returns false after last step, otherwise temporary state |
||
117 | * @access public |
||
118 | */ |
||
119 | public function purge_step($old_state) |
||
141 | |||
142 | /** |
||
143 | * Notification handler to call notification enable/disable/purge steps |
||
144 | * |
||
145 | * @param string $step The step (enable, disable, purge) |
||
146 | * @param array $notification_types The notification type names |
||
147 | * @return string Return notifications as temporary state |
||
148 | * @access protected |
||
149 | */ |
||
150 | protected function notification_handler($step, $notification_types) |
||
161 | } |
||
162 |