Completed
Push — master ( 2fb092...058edd )
by Craig
06:38
created

StandardFieldsTrait   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 123
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 123
rs 10
c 0
b 0
f 0
wmc 8
lcom 0
cbo 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getCreatedBy() 0 4 1
A setCreatedBy() 0 4 1
A getCreatedDate() 0 4 1
A setCreatedDate() 0 4 1
A getUpdatedBy() 0 4 1
A setUpdatedBy() 0 4 1
A getUpdatedDate() 0 4 1
A setUpdatedDate() 0 4 1
1
<?php
2
/**
3
 * Routes.
4
 *
5
 * @copyright Zikula contributors (Zikula)
6
 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
7
 * @author Zikula contributors <[email protected]>.
8
 * @link http://www.zikula.org
9
 * @link http://zikula.org
10
 * @version Generated by ModuleStudio 0.7.1 (http://modulestudio.de).
11
 */
12
13
namespace Zikula\RoutesModule\Traits;
14
15
use Doctrine\ORM\Mapping as ORM;
16
use Gedmo\Mapping\Annotation as Gedmo;
17
use Symfony\Component\Validator\Constraints as Assert;
18
use Zikula\UsersModule\Entity\UserEntity;
19
20
/**
21
 * Standard fields trait implementation class.
22
 */
23
trait StandardFieldsTrait
24
{
25
    /**
26
     * @Gedmo\Blameable(on="create")
27
     * @ORM\ManyToOne(targetEntity="Zikula\UsersModule\Entity\UserEntity")
28
     * @ORM\JoinColumn(referencedColumnName="uid")
29
     * @var UserEntity
30
     */
31
    protected $createdBy;
32
    
33
    /**
34
     * @ORM\Column(type="datetime")
35
     * @Gedmo\Timestampable(on="create")
36
     * @Assert\DateTime()
37
     * @var \DateTime $createdDate
38
     */
39
    protected $createdDate;
40
    
41
    /**
42
     * @Gedmo\Blameable(on="update")
43
     * @ORM\ManyToOne(targetEntity="Zikula\UsersModule\Entity\UserEntity")
44
     * @ORM\JoinColumn(referencedColumnName="uid")
45
     * @var UserEntity
46
     */
47
    protected $updatedBy;
48
    
49
    /**
50
     * @ORM\Column(type="datetime")
51
     * @Gedmo\Timestampable(on="update")
52
     * @Assert\DateTime()
53
     * @var \DateTime $updatedDate
54
     */
55
    protected $updatedDate;
56
    
57
    /**
58
     * Returns the created by.
59
     *
60
     * @return UserEntity
61
     */
62
    public function getCreatedBy()
63
    {
64
        return $this->createdBy;
65
    }
66
    
67
    /**
68
     * Sets the created by.
69
     *
70
     * @param UserEntity $createdBy
71
     *
72
     * @return void
73
     */
74
    public function setCreatedBy($createdBy)
75
    {
76
        $this->createdBy = $createdBy;
77
    }
78
    
79
    /**
80
     * Returns the created date.
81
     *
82
     * @return \DateTime
83
     */
84
    public function getCreatedDate()
85
    {
86
        return $this->createdDate;
87
    }
88
    
89
    /**
90
     * Sets the created date.
91
     *
92
     * @param \DateTime $createdDate
93
     *
94
     * @return void
95
     */
96
    public function setCreatedDate($createdDate)
97
    {
98
        $this->createdDate = $createdDate;
99
    }
100
    
101
    /**
102
     * Returns the updated by.
103
     *
104
     * @return UserEntity
105
     */
106
    public function getUpdatedBy()
107
    {
108
        return $this->updatedBy;
109
    }
110
    
111
    /**
112
     * Sets the updated by.
113
     *
114
     * @param UserEntity $updatedBy
115
     *
116
     * @return void
117
     */
118
    public function setUpdatedBy($updatedBy)
119
    {
120
        $this->updatedBy = $updatedBy;
121
    }
122
    
123
    /**
124
     * Returns the updated date.
125
     *
126
     * @return \DateTime
127
     */
128
    public function getUpdatedDate()
129
    {
130
        return $this->updatedDate;
131
    }
132
    
133
    /**
134
     * Sets the updated date.
135
     *
136
     * @param \DateTime $updatedDate
137
     *
138
     * @return void
139
     */
140
    public function setUpdatedDate($updatedDate)
141
    {
142
        $this->updatedDate = $updatedDate;
143
    }
144
    
145
}
146