@@ 11-103 (lines=93) @@ | ||
8 | use Kunstmaan\AdminBundle\Entity\AbstractEntity; |
|
9 | use Symfony\Component\Validator\Constraints as Assert; |
|
10 | ||
11 | class AbstractCategory extends AbstractEntity implements Translatable |
|
12 | { |
|
13 | /** |
|
14 | * AbstractCategory constructor. |
|
15 | */ |
|
16 | public function __construct() |
|
17 | { |
|
18 | if (\get_class($this) === AbstractCategory::class) { |
|
19 | @trigger_error(sprintf('Instantiating the "%s" class is deprecated in KunstmaanArticleBundle 5.1 and will be made abstract in KunstmaanArticleBundle 6.0. Extend your implementation from this class instead.', __CLASS__), E_USER_DEPRECATED); |
|
20 | } |
|
21 | } |
|
22 | ||
23 | /** |
|
24 | * @var string |
|
25 | * |
|
26 | * @ORM\Column(name="name", type="string", length=255) |
|
27 | * @Assert\NotBlank() |
|
28 | * @Gedmo\Translatable |
|
29 | */ |
|
30 | protected $name; |
|
31 | ||
32 | /** |
|
33 | * @Gedmo\Locale |
|
34 | */ |
|
35 | protected $locale; |
|
36 | ||
37 | /** |
|
38 | * @var \DateTime |
|
39 | * |
|
40 | * @ORM\Column(name="deleted_at", type="datetime", nullable=true) |
|
41 | */ |
|
42 | protected $deletedAt; |
|
43 | ||
44 | /** |
|
45 | * Set name |
|
46 | * |
|
47 | * @param string $name |
|
48 | */ |
|
49 | public function setName($name) |
|
50 | { |
|
51 | $this->name = $name; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * Get name |
|
56 | * |
|
57 | * @return string |
|
58 | */ |
|
59 | public function getName() |
|
60 | { |
|
61 | return $this->name; |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * @return mixed |
|
66 | */ |
|
67 | public function getLocale() |
|
68 | { |
|
69 | return $this->locale; |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * @param mixed $locale |
|
74 | */ |
|
75 | public function setLocale($locale) |
|
76 | { |
|
77 | $this->locale = $locale; |
|
78 | } |
|
79 | ||
80 | /** |
|
81 | * @return \DateTime |
|
82 | */ |
|
83 | public function getDeletedAt() |
|
84 | { |
|
85 | return $this->deletedAt; |
|
86 | } |
|
87 | ||
88 | /** |
|
89 | * @param \DateTime $deletedAt |
|
90 | */ |
|
91 | public function setDeletedAt($deletedAt) |
|
92 | { |
|
93 | $this->deletedAt = $deletedAt; |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * @return string |
|
98 | */ |
|
99 | public function __toString() |
|
100 | { |
|
101 | return $this->getName(); |
|
102 | } |
|
103 | } |
|
104 |
@@ 11-103 (lines=93) @@ | ||
8 | use Kunstmaan\AdminBundle\Entity\AbstractEntity; |
|
9 | use Symfony\Component\Validator\Constraints as Assert; |
|
10 | ||
11 | class AbstractTag extends AbstractEntity implements Translatable |
|
12 | { |
|
13 | /** |
|
14 | * AbstractTag constructor. |
|
15 | */ |
|
16 | public function __construct() |
|
17 | { |
|
18 | if (\get_class($this) === AbstractTag::class) { |
|
19 | @trigger_error(sprintf('Instantiating the "%s" class is deprecated in KunstmaanArticleBundle 5.1 and will be made abstract in KunstmaanArticleBundle 6.0. Extend your implementation from this class instead.', __CLASS__), E_USER_DEPRECATED); |
|
20 | } |
|
21 | } |
|
22 | ||
23 | /** |
|
24 | * @var string |
|
25 | * |
|
26 | * @ORM\Column(name="name", type="string", length=255) |
|
27 | * @Assert\NotBlank() |
|
28 | * @Gedmo\Translatable |
|
29 | */ |
|
30 | protected $name; |
|
31 | ||
32 | /** |
|
33 | * @Gedmo\Locale |
|
34 | */ |
|
35 | protected $locale; |
|
36 | ||
37 | /** |
|
38 | * @var \DateTime |
|
39 | * |
|
40 | * @ORM\Column(name="deleted_at", type="datetime", nullable=true) |
|
41 | */ |
|
42 | protected $deletedAt; |
|
43 | ||
44 | /** |
|
45 | * Set name |
|
46 | * |
|
47 | * @param string $name |
|
48 | */ |
|
49 | public function setName($name) |
|
50 | { |
|
51 | $this->name = $name; |
|
52 | } |
|
53 | ||
54 | /** |
|
55 | * Get name |
|
56 | * |
|
57 | * @return string |
|
58 | */ |
|
59 | public function getName() |
|
60 | { |
|
61 | return $this->name; |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * @return mixed |
|
66 | */ |
|
67 | public function getLocale() |
|
68 | { |
|
69 | return $this->locale; |
|
70 | } |
|
71 | ||
72 | /** |
|
73 | * @param mixed $locale |
|
74 | */ |
|
75 | public function setLocale($locale) |
|
76 | { |
|
77 | $this->locale = $locale; |
|
78 | } |
|
79 | ||
80 | /** |
|
81 | * @return \DateTime |
|
82 | */ |
|
83 | public function getDeletedAt() |
|
84 | { |
|
85 | return $this->deletedAt; |
|
86 | } |
|
87 | ||
88 | /** |
|
89 | * @param \DateTime $deletedAt |
|
90 | */ |
|
91 | public function setDeletedAt($deletedAt) |
|
92 | { |
|
93 | $this->deletedAt = $deletedAt; |
|
94 | } |
|
95 | ||
96 | /** |
|
97 | * @return string |
|
98 | */ |
|
99 | public function __toString() |
|
100 | { |
|
101 | return $this->getName(); |
|
102 | } |
|
103 | } |
|
104 |