Hygiene: Move Popups.hooks into includes folder

Lets keep all extenion PHP files in one folder

Change-Id: I225019b895df038c1d43a082ac4244053d0b96dd
This commit is contained in:
Piotr Miazga 2017-02-14 20:22:55 +01:00
parent 6908b59ccf
commit 2988a6e620
3 changed files with 22 additions and 11 deletions

View file

@ -9,7 +9,7 @@
"license-name": "GPL-2.0+",
"type": "betafeatures",
"AutoloadClasses": {
"PopupsHooks": "Popups.hooks.php",
"Popups\\PopupsHooks": "includes/PopupsHooks.php",
"Popups\\PopupsContext": "includes/PopupsContext.php",
"Popups\\PopupsGadgetsIntegration": "includes/PopupsGadgetsIntegration.php"
},
@ -18,25 +18,25 @@
},
"Hooks": {
"GetBetaFeaturePreferences": [
"PopupsHooks::onGetBetaPreferences"
"Popups\\PopupsHooks::onGetBetaPreferences"
],
"BeforePageDisplay": [
"PopupsHooks::onBeforePageDisplay"
"Popups\\PopupsHooks::onBeforePageDisplay"
],
"ResourceLoaderTestModules": [
"PopupsHooks::onResourceLoaderTestModules"
"Popups\\PopupsHooks::onResourceLoaderTestModules"
],
"ResourceLoaderGetConfigVars": [
"PopupsHooks::onResourceLoaderGetConfigVars"
"Popups\\PopupsHooks::onResourceLoaderGetConfigVars"
],
"GetPreferences": [
"PopupsHooks::onGetPreferences"
"Popups\\PopupsHooks::onGetPreferences"
],
"UserGetDefaultOptions": [
"PopupsHooks::onUserGetDefaultOptions"
"Popups\\PopupsHooks::onUserGetDefaultOptions"
],
"MakeGlobalVariablesScript": [
"PopupsHooks::onMakeGlobalVariablesScript"
"Popups\\PopupsHooks::onMakeGlobalVariablesScript"
]
},
"MessagesDirs": {

View file

@ -18,8 +18,18 @@
* @file
* @ingroup extensions
*/
use Popups\PopupsContext;
namespace Popups;
use User;
use OutputPage;
use Skin;
use ResourceLoader;
/**
* Hooks definitions for Popups extension
*
* @package Popups
*/
class PopupsHooks {
const PREVIEWS_PREFERENCES_SECTION = 'rendering/reading';
@ -119,8 +129,8 @@ class PopupsHooks {
$testModules['qunit']['ext.popups.tests.stubs'] = [
'scripts' => [
'tests/qunit/ext.popups/stubs/index.js',
'tests/qunit/ext.popups/stubs/user.js',
'../tests/qunit/ext.popups/stubs/index.js',
'../tests/qunit/ext.popups/stubs/user.js',
],
'dependencies' => [
'ext.popups', // The mw.popups is required.

View file

@ -20,6 +20,7 @@
*/
require_once ( 'PopupsContextTestWrapper.php' );
use Popups\PopupsContext;
use Popups\PopupsHooks;
/**
* Integration tests for Page Preview hooks