-
Notifications
You must be signed in to change notification settings - Fork 18
/
ext.php
38 lines (35 loc) · 1.11 KB
/
ext.php
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
<?php
/**
*
* Collapsible Categories extension for the phpBB Forum Software package.
*
* @copyright (c) 2015 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
namespace phpbb\collapsiblecategories;
/**
* This ext class is optional and can be omitted if left empty.
* However, you can add special (un)installation commands in the
* methods enable_step(), disable_step() and purge_step(). As it is,
* these methods are defined in \phpbb\extension\base, which this
* class extends, but you can overwrite them to give special
* instructions for those cases.
*/
class ext extends \phpbb\extension\base
{
/** @var string Require phpBB 3.3.11 due to restyling of Prosilver forum header bar */
public const PHPBB_MIN_VERSION = '3.3.11';
/**
* Check whether the extension can be enabled.
* The current phpBB version should meet or exceed
* the minimum version required by this extension:
*
* @return bool
*/
public function is_enableable()
{
$config = $this->container->get('config');
return phpbb_version_compare($config['version'], self::PHPBB_MIN_VERSION, '>=');
}
}