/
GroupSignupRequestDeclineListView.php
51 lines (40 loc) · 1.4 KB
/
GroupSignupRequestDeclineListView.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
50
51
<?php
namespace Concrete\Core\Notification\View;
use Concrete\Core\Entity\Notification\GroupSignupRequestDeclineNotification;
use Concrete\Core\Support\Facade\Facade;
use Concrete\Core\User\Group\Group;
use HtmlObject\Element;
class GroupSignupRequestDeclineListView extends StandardListView
{
/**
* @var GroupSignupRequestDeclineNotification
*/
protected $notification;
public function getTitle()
{
return t('Group declined signup requests');
}
public function getIconClass()
{
return 'fas fa-user';
}
public function getActionDescription()
{
$app = Facade::getFacadeApplication();
$resolver = $app->make('url/manager');
$user = $this->notification->getSignupRequestDecline()->getUser();
$group = $this->notification->getSignupRequestDecline()->getGroup();
$manager = $this->notification->getSignupRequestDecline()->getManager();
return t('User <a href="%s">%s</a> declined the request to signup the group %s from user <a href="%s">%s</a>.',
$resolver->resolve([$manager->getUserInfoObject()]),
$manager->getUserName(),
$group->getGroupName(),
$resolver->resolve([$user->getUserInfoObject()]),
$user->getUserName()
);
}
protected function getRequestedByElement()
{
return new Element('span', t('Created By '));
}
}