1 | <?php |
||
2 | |||
3 | /* |
||
4 | * @copyright 2014 Mautic Contributors. All rights reserved |
||
5 | * @author Mautic |
||
6 | * |
||
7 | * @link http://mautic.org |
||
8 | * |
||
9 | * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html |
||
10 | */ |
||
11 | |||
12 | namespace Mautic\StageBundle\Entity; |
||
13 | |||
14 | use Doctrine\ORM\Mapping as ORM; |
||
15 | use Mautic\CoreBundle\Doctrine\Mapping\ClassMetadataBuilder; |
||
16 | |||
17 | /** |
||
18 | * Class LeadStageLog. |
||
19 | */ |
||
20 | class LeadStageLog |
||
21 | { |
||
22 | /** |
||
23 | * @var Stage |
||
24 | **/ |
||
25 | private $stage; |
||
26 | |||
27 | /** |
||
28 | * @var \Mautic\LeadBundle\Entity\Lead |
||
29 | */ |
||
30 | private $lead; |
||
31 | |||
32 | /** |
||
33 | * @var \Mautic\CoreBundle\Entity\IpAddress |
||
34 | */ |
||
35 | private $ipAddress; |
||
36 | |||
37 | /** |
||
38 | * @var \DateTime |
||
39 | **/ |
||
40 | private $dateFired; |
||
41 | |||
42 | public static function loadMetadata(ORM\ClassMetadata $metadata) |
||
43 | { |
||
44 | $builder = new ClassMetadataBuilder($metadata); |
||
45 | |||
46 | $builder->setTable('stage_lead_action_log') |
||
47 | ->setCustomRepositoryClass('Mautic\StageBundle\Entity\LeadStageLogRepository'); |
||
48 | |||
49 | $builder->createManyToOne('stage', 'Stage') |
||
50 | ->isPrimaryKey() |
||
51 | ->addJoinColumn('stage_id', 'id', true, false, 'CASCADE') |
||
52 | ->inversedBy('log') |
||
53 | ->build(); |
||
54 | |||
55 | $builder->addLead(false, 'CASCADE', true); |
||
0 ignored issues
–
show
|
|||
56 | |||
57 | $builder->addIpAddress(true); |
||
58 | |||
59 | $builder->createField('dateFired', 'datetime') |
||
60 | ->columnName('date_fired') |
||
61 | ->build(); |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @return mixed |
||
66 | */ |
||
67 | public function getDateFired() |
||
68 | { |
||
69 | return $this->dateFired; |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * @param mixed $dateFired |
||
74 | */ |
||
75 | public function setDateFired($dateFired) |
||
76 | { |
||
77 | $this->dateFired = $dateFired; |
||
78 | } |
||
79 | |||
80 | /** |
||
81 | * @return mixed |
||
82 | */ |
||
83 | public function getIpAddress() |
||
84 | { |
||
85 | return $this->ipAddress; |
||
86 | } |
||
87 | |||
88 | /** |
||
89 | * @param mixed $ipAddress |
||
90 | */ |
||
91 | public function setIpAddress($ipAddress) |
||
92 | { |
||
93 | $this->ipAddress = $ipAddress; |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * @return mixed |
||
98 | */ |
||
99 | public function getLead() |
||
100 | { |
||
101 | return $this->lead; |
||
102 | } |
||
103 | |||
104 | /** |
||
105 | * @param mixed $lead |
||
106 | */ |
||
107 | public function setLead($lead) |
||
108 | { |
||
109 | $this->lead = $lead; |
||
110 | } |
||
111 | |||
112 | /** |
||
113 | * @return mixed |
||
114 | */ |
||
115 | public function getStage() |
||
116 | { |
||
117 | return $this->stage; |
||
118 | } |
||
119 | |||
120 | /** |
||
121 | * @param mixed $stage |
||
122 | */ |
||
123 | public function setStage($stage) |
||
124 | { |
||
125 | $this->stage = $stage; |
||
126 | } |
||
127 | } |
||
128 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.