1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 10:16:36 +02:00

[ticket/15257] Provide extension not enableable messages

PHPBB3-15257
This commit is contained in:
Jakub Senko
2019-03-27 12:09:55 +01:00
committed by Marc Alexander
parent b6c230753e
commit 975fe1e153
7 changed files with 70 additions and 13 deletions

View File

@@ -0,0 +1,23 @@
{
"name": "vendor5/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.3.*@dev"
}
}
}

View File

@@ -0,0 +1,19 @@
<?php
namespace vendor5\foo;
class ext extends \phpbb\extension\base
{
static public $enabled;
public function is_enableable()
{
return array('Reason 1', 'Reason 2');
}
public function enable_step($old_state)
{
self::$enabled = true;
return self::$enabled;
}
}