mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-30 11:04:30 +00:00
Use ::class for class name resolution of EchoUserLocator
Also use namespaced class and AttributeManager::ATTR_LOCATORS as seen in other extensions (like LoginNotify) Change-Id: I183043ed91c20479b9594209341bf227507bb083
This commit is contained in:
parent
dfbd255b80
commit
2e491bfde1
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
namespace MediaWiki\Extension\OATHAuth\Hook;
|
namespace MediaWiki\Extension\OATHAuth\Hook;
|
||||||
|
|
||||||
|
use MediaWiki\Extension\Notifications\AttributeManager;
|
||||||
use MediaWiki\Extension\Notifications\Hooks\BeforeCreateEchoEventHook;
|
use MediaWiki\Extension\Notifications\Hooks\BeforeCreateEchoEventHook;
|
||||||
|
use MediaWiki\Extension\Notifications\UserLocator;
|
||||||
use MediaWiki\Extension\OATHAuth\Notifications\DisablePresentationModel;
|
use MediaWiki\Extension\OATHAuth\Notifications\DisablePresentationModel;
|
||||||
use MediaWiki\Extension\OATHAuth\Notifications\EnablePresentationModel;
|
use MediaWiki\Extension\OATHAuth\Notifications\EnablePresentationModel;
|
||||||
|
|
||||||
|
@ -31,7 +33,9 @@ class EchoHandler implements BeforeCreateEchoEventHook {
|
||||||
'section' => 'alert',
|
'section' => 'alert',
|
||||||
'presentation-model' => DisablePresentationModel::class,
|
'presentation-model' => DisablePresentationModel::class,
|
||||||
'canNotifyAgent' => true,
|
'canNotifyAgent' => true,
|
||||||
'user-locators' => [ 'EchoUserLocator::locateEventAgent' ],
|
AttributeManager::ATTR_LOCATORS => [
|
||||||
|
[ [ UserLocator::class, 'locateEventAgent' ] ],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$notifications['oathauth-enable'] = [
|
$notifications['oathauth-enable'] = [
|
||||||
|
@ -40,7 +44,9 @@ class EchoHandler implements BeforeCreateEchoEventHook {
|
||||||
'section' => 'alert',
|
'section' => 'alert',
|
||||||
'presentation-model' => EnablePresentationModel::class,
|
'presentation-model' => EnablePresentationModel::class,
|
||||||
'canNotifyAgent' => true,
|
'canNotifyAgent' => true,
|
||||||
'user-locators' => [ 'EchoUserLocator::locateEventAgent' ],
|
AttributeManager::ATTR_LOCATORS => [
|
||||||
|
[ [ UserLocator::class, 'locateEventAgent' ] ],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue