|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* |
|
4
|
|
|
* Collapsible Categories extension for the phpBB Forum Software package. |
|
5
|
|
|
* |
|
6
|
|
|
* @copyright (c) 2015 phpBB Limited <https://www.phpbb.com> |
|
7
|
|
|
* @license GNU General Public License, version 2 (GPL-2.0) |
|
8
|
|
|
* |
|
9
|
|
|
*/ |
|
10
|
|
|
|
|
11
|
|
|
namespace phpbb\collapsiblecategories; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* This ext class is optional and can be omitted if left empty. |
|
15
|
|
|
* However, you can add special (un)installation commands in the |
|
16
|
|
|
* methods enable_step(), disable_step() and purge_step(). As it is, |
|
17
|
|
|
* these methods are defined in \phpbb\extension\base, which this |
|
18
|
|
|
* class extends, but you can overwrite them to give special |
|
19
|
|
|
* instructions for those cases. |
|
20
|
|
|
*/ |
|
21
|
|
|
class ext extends \phpbb\extension\base |
|
22
|
|
|
{ |
|
23
|
|
|
/** @var string Require phpBB 3.3.11 due to restyling of Prosilver forum header bar */ |
|
24
|
|
|
public const PHPBB_MIN_VERSION = '3.3.11'; |
|
25
|
|
|
|
|
26
|
|
|
/** |
|
27
|
|
|
* Check whether the extension can be enabled. |
|
28
|
|
|
* The current phpBB version should meet or exceed |
|
29
|
|
|
* the minimum version required by this extension: |
|
30
|
|
|
* |
|
31
|
|
|
* @return bool |
|
32
|
|
|
*/ |
|
33
|
10 |
|
public function is_enableable() |
|
34
|
|
|
{ |
|
35
|
10 |
|
$config = $this->container->get('config'); |
|
36
|
10 |
|
return phpbb_version_compare($config['version'], self::PHPBB_MIN_VERSION, '>='); |
|
37
|
|
|
} |
|
38
|
|
|
} |
|
39
|
|
|
|