-
Notifications
You must be signed in to change notification settings - Fork 1
/
Listener.php
49 lines (41 loc) · 1.73 KB
/
Listener.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace TickTackk\ChangeContentOwner;
use XF\InlineMod\AbstractHandler as InlineModAbstractHandler;
use XF\App as XFApp;
/**
* Class Listener
*
* @package TickTackk\ChangeContentOwner
*/
class Listener
{
/**
* @param InlineModAbstractHandler $abstractHandler
* @param XFApp $app
* @param array $actions
*/
public static function inlineModActions(/** @noinspection PhpUnusedParameterInspection */ InlineModAbstractHandler $abstractHandler, XFApp $app, array &$actions) : void
{
switch ($abstractHandler->getContentType())
{
case 'thread':
$actions['change_owner'] = $abstractHandler->getActionHandler('TickTackk\ChangeContentOwner\XF:Thread\ChangeOwner');
break;
case 'post':
$actions['change_owner'] = $abstractHandler->getActionHandler('TickTackk\ChangeContentOwner\XF:Post\ChangeOwner');
break;
case 'profile_post':
$actions['change_owner'] = $abstractHandler->getActionHandler('TickTackk\ChangeContentOwner\XF:ProfilePost\ChangeOwner');
break;
case 'xfmg_album':
$actions['change_owner'] = $abstractHandler->getActionHandler('TickTackk\ChangeContentOwner\XFMG:Album\ChangeOwner');
break;
case 'xfmg_media':
$actions['change_owner'] = $abstractHandler->getActionHandler('TickTackk\ChangeContentOwner\XFMG:Media\ChangeOwner');
break;
case 'xfmg_comment':
$actions['change_owner'] = $abstractHandler->getActionHandler('TickTackk\ChangeContentOwner\XFMG:Comment\ChangeOwner');
break;
}
}
}