/
UserSignupNotification.php
49 lines (40 loc) · 1.04 KB
/
UserSignupNotification.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 Concrete\Core\Entity\Notification;
use Concrete\Core\Entity\User\UserSignup;
use Concrete\Core\Notification\Subject\SubjectInterface;
use Concrete\Core\Notification\View\UserSignupListView;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(
* name="UserSignupNotifications"
* )
*/
class UserSignupNotification extends Notification
{
/**
* @ORM\ManyToOne(targetEntity="\Concrete\Core\Entity\User\UserSignup", cascade={"persist", "remove"}, inversedBy="notifications"),
* @ORM\JoinColumn(name="usID", referencedColumnName="usID")
*/
protected $signup;
/**
* UserSignupNotification constructor.
* @param $signup UserSignup
*/
public function __construct(SubjectInterface $signup)
{
$this->signup = $signup;
parent::__construct($signup);
}
/**
* @return mixed
*/
public function getSignupRequest()
{
return $this->signup;
}
public function getListView()
{
return new UserSignupListView($this);
}
}