mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/12847] Allow the extensions to say if they can be enabled
PHPBB3-12847
This commit is contained in:
23
tests/extension/ext/vendor3/foo/composer.json
Normal file
23
tests/extension/ext/vendor3/foo/composer.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "vendor3/foo",
|
||||
"type": "phpbb-extension",
|
||||
"description": "An example/sample extension to be used for testing purposes in phpBB Development.",
|
||||
"version": "1.0.0",
|
||||
"time": "2012-02-15 01:01:01",
|
||||
"license": "GPL-2.0",
|
||||
"authors": [{
|
||||
"name": "John Smith",
|
||||
"email": "email@phpbb.com",
|
||||
"homepage": "http://phpbb.com",
|
||||
"role": "N/A"
|
||||
}],
|
||||
"require": {
|
||||
"php": ">=5.3"
|
||||
},
|
||||
"extra": {
|
||||
"display-name": "phpBB Bar Extension",
|
||||
"soft-require": {
|
||||
"phpbb/phpbb": "3.1.*@dev"
|
||||
}
|
||||
}
|
||||
}
|
20
tests/extension/ext/vendor3/foo/ext.php
Normal file
20
tests/extension/ext/vendor3/foo/ext.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace vendor3\foo;
|
||||
|
||||
class ext extends \phpbb\extension\base
|
||||
{
|
||||
static public $enabled;
|
||||
|
||||
public function enable_step($old_state)
|
||||
{
|
||||
self::$enabled = true;
|
||||
|
||||
return self::$enabled;
|
||||
}
|
||||
|
||||
public function is_enableable()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user