Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| EchoNotificationsHandlers | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| onEchoGetBundleRules | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\Wikistories\Hooks; |
| 4 | |
| 5 | use MediaWiki\Extension\Notifications\Model\Event; |
| 6 | |
| 7 | class EchoNotificationsHandlers { |
| 8 | |
| 9 | public const NOTIFICATION_TYPE = 'wikistories-articlechanged'; |
| 10 | |
| 11 | /** |
| 12 | * @param Event $event |
| 13 | * @param string &$bundleString |
| 14 | */ |
| 15 | public function onEchoGetBundleRules( $event, &$bundleString ) { |
| 16 | if ( $event->getType() === self::NOTIFICATION_TYPE ) { |
| 17 | $bundleString = $event->getTitle()->getPrefixedDBkey(); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | } |