[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSFoundation: Added more hook base classes
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377216 ) Change subject: BSFoundation: Added more hook base classes .. BSFoundation: Added more hook base classes * GetPreferences * SkinTemplateOutputPageBeforeExec Change-Id: Ia7d142fd81b506a7894f4b63cb2c730ea200bb3c --- A src/Hook/GetPreferences.php A src/Hook/SkinTemplateOutputPageBeforeExec.php 2 files changed, 150 insertions(+), 0 deletions(-) Approvals: Robert Vogel: Looks good to me, approved jenkins-bot: Verified diff --git a/src/Hook/GetPreferences.php b/src/Hook/GetPreferences.php new file mode 100644 index 000..6d4d341 --- /dev/null +++ b/src/Hook/GetPreferences.php @@ -0,0 +1,75 @@ +http://bluespice.com + * + * @author Patric Wirth + * @packageBlueSpiceFoundation + * @copyright Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved. + * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ +namespace BlueSpice\Hook; +use BlueSpice\Hook; + +abstract class GetPreferences extends Hook { + + /** +* +* @var \User +*/ + protected $user = null; + + /** +* +* @var array +*/ + protected $preferences = null; + + /** +* +* @param \User $user +* @param array $preferences +* @return boolean +*/ + public static function callback( $user, &$preferences ) { + $className = static::class; + $hookHandler = new $className( + null, + null, + $user, + $preferences + ); + return $hookHandler->process(); + } + + /** +* +* @param \IContextSource $context +* @param \Config $config +* @param \User $user +* @param array $preferences +*/ + public function __construct( $context, $config, &$user, &$preferences ) { + parent::__construct( $context, $config ); + + $this->user = $user; + $this->preferences = &$preferences; + } +} \ No newline at end of file diff --git a/src/Hook/SkinTemplateOutputPageBeforeExec.php b/src/Hook/SkinTemplateOutputPageBeforeExec.php new file mode 100644 index 000..cc1ebad --- /dev/null +++ b/src/Hook/SkinTemplateOutputPageBeforeExec.php @@ -0,0 +1,75 @@ +http://bluespice.com + * + * @author Patric Wirth + * @packageBlueSpiceFoundation + * @copyright Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved. + * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ +namespace BlueSpice\Hook; +use BlueSpice\Hook; + +abstract class SkinTemplateOutputPageBeforeExec extends Hook { + + /** +* +* @var \SkinTemplate +*/ + protected $skin = null; + + /** +* +* @var \QuickTemplate +*/ + protected $template = null; + + /** +* +* @param \SkinTemplate $skin +* @param \QuickTemplate template +* @return boolean +*/ + public static function callback( &$skin, &$template ) { + $className = static::class; + $hookHandler = new $className( + null, + null, + $skin, + $template + ); + return $hookHandler->process(); + } + + /** +* +* @param \IContextSource $context +* @param \Config $config +* @param \SkinTemplate $skin +* @param \QuickTemplate template +*/ + public function __construct( $context, $config, &$skin, &$template ) { + parent::__construct( $context, $config ); + + $this->skin = $skin; + $this->template = &$template; + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/377216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia7d142fd81b506a7894f4b63cb2c730ea200bb3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth Gerrit-Reviewer: Ljonka Gerrit-Reviewer: Mglaser Gerrit-Reviewer: Robert Vogel Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSFoundation: Added more hook base classes
Pwirth has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/377216 ) Change subject: BSFoundation: Added more hook base classes .. BSFoundation: Added more hook base classes * GetPreferences * SkinTemplateOutputPageBeforeExec Change-Id: Ia7d142fd81b506a7894f4b63cb2c730ea200bb3c --- A src/Hook/GetPreferences.php A src/Hook/SkinTemplateOutputPageBeforeExec.php 2 files changed, 150 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation refs/changes/16/377216/1 diff --git a/src/Hook/GetPreferences.php b/src/Hook/GetPreferences.php new file mode 100644 index 000..6d4d341 --- /dev/null +++ b/src/Hook/GetPreferences.php @@ -0,0 +1,75 @@ +http://bluespice.com + * + * @author Patric Wirth + * @packageBlueSpiceFoundation + * @copyright Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved. + * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ +namespace BlueSpice\Hook; +use BlueSpice\Hook; + +abstract class GetPreferences extends Hook { + + /** +* +* @var \User +*/ + protected $user = null; + + /** +* +* @var array +*/ + protected $preferences = null; + + /** +* +* @param \User $user +* @param array $preferences +* @return boolean +*/ + public static function callback( $user, &$preferences ) { + $className = static::class; + $hookHandler = new $className( + null, + null, + $user, + $preferences + ); + return $hookHandler->process(); + } + + /** +* +* @param \IContextSource $context +* @param \Config $config +* @param \User $user +* @param array $preferences +*/ + public function __construct( $context, $config, &$user, &$preferences ) { + parent::__construct( $context, $config ); + + $this->user = $user; + $this->preferences = &$preferences; + } +} \ No newline at end of file diff --git a/src/Hook/SkinTemplateOutputPageBeforeExec.php b/src/Hook/SkinTemplateOutputPageBeforeExec.php new file mode 100644 index 000..cc1ebad --- /dev/null +++ b/src/Hook/SkinTemplateOutputPageBeforeExec.php @@ -0,0 +1,75 @@ +http://bluespice.com + * + * @author Patric Wirth + * @packageBlueSpiceFoundation + * @copyright Copyright (C) 2017 Hallo Welt! GmbH, All rights reserved. + * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or later + * @filesource + */ +namespace BlueSpice\Hook; +use BlueSpice\Hook; + +abstract class SkinTemplateOutputPageBeforeExec extends Hook { + + /** +* +* @var \SkinTemplate +*/ + protected $skin = null; + + /** +* +* @var \QuickTemplate +*/ + protected $template = null; + + /** +* +* @param \SkinTemplate $skin +* @param \QuickTemplate template +* @return boolean +*/ + public static function callback( &$skin, &$template ) { + $className = static::class; + $hookHandler = new $className( + null, + null, + $skin, + $template + ); + return $hookHandler->process(); + } + + /** +* +* @param \IContextSource $context +* @param \Config $config +* @param \SkinTemplate $skin +* @param \QuickTemplate template +*/ + public function __construct( $context, $config, &$skin, &$template ) { + parent::__construct( $context, $config ); + + $this->skin = $skin; + $this->template = &$template; + } +} \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/377216 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia7d142fd81b506a7894f4b63cb2c730ea200bb3c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation Gerrit-Branch: master Gerrit-Owner: Pwirth ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits