1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Entity; |
4
|
|
|
|
5
|
|
|
use Sonata\MediaBundle\Entity\BaseGalleryHasMedia as BaseGalleryHasMedia; |
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
7
|
|
|
use Sonata\TranslationBundle\Model\Gedmo\TranslatableInterface; |
8
|
|
|
use Gedmo\Translatable\Translatable; |
9
|
|
|
use Gedmo\Mapping\Annotation as Gedmo; |
10
|
|
|
use Sonata\TranslationBundle\Traits\Gedmo\PersonalTranslatable; |
11
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @ORM\Table(name="media__gallery_media") |
15
|
|
|
* @ORM\Entity |
16
|
|
|
* @Gedmo\TranslationEntity(class="App\Entity\Translations\GalleryHasMediaTranslation") |
17
|
|
|
*/ |
18
|
|
|
class GalleryHasMedia extends BaseGalleryHasMedia implements TranslatableInterface |
19
|
|
|
{ |
20
|
|
|
use PersonalTranslatable; |
|
|
|
|
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* not mapped field |
24
|
|
|
* @var bool |
25
|
|
|
*/ |
26
|
|
|
public $delete; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @var integer |
30
|
|
|
* |
31
|
|
|
* @ORM\Column(name="id", type="integer") |
32
|
|
|
* @ORM\Id |
33
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
34
|
|
|
*/ |
35
|
|
|
protected $id; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var string |
39
|
|
|
* @ORM\Column(type="string", length=255, nullable=true) |
40
|
|
|
* @Gedmo\Translatable |
41
|
|
|
*/ |
42
|
|
|
private $title; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var string |
46
|
|
|
* @ORM\Column(type="text", nullable=true) |
47
|
|
|
* @Gedmo\Translatable |
48
|
|
|
*/ |
49
|
|
|
private $description; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @var ArrayCollection |
53
|
|
|
* |
54
|
|
|
* @ORM\OneToMany( |
55
|
|
|
* targetEntity="App\Entity\Translations\GalleryHasMediaTranslation", |
56
|
|
|
* mappedBy="object", |
57
|
|
|
* cascade={"persist", "remove"} |
58
|
|
|
* ) |
59
|
|
|
*/ |
60
|
|
|
protected $translations; |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Unset translations |
64
|
|
|
* |
65
|
|
|
* @return GalleryHasMedia |
66
|
|
|
*/ |
67
|
|
|
public function unsetTranslations() |
68
|
|
|
{ |
69
|
|
|
$this->translations = null; |
70
|
|
|
|
71
|
|
|
return $this; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* Get id |
76
|
|
|
* |
77
|
|
|
* @return integer |
78
|
|
|
*/ |
79
|
|
|
public function getId() |
80
|
|
|
{ |
81
|
|
|
return $this->id; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* Get title |
86
|
|
|
* |
87
|
|
|
* @return string |
88
|
|
|
*/ |
89
|
11 |
|
public function getTitle() |
90
|
|
|
{ |
91
|
11 |
|
return $this->title; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* Set title |
96
|
|
|
* |
97
|
|
|
* @param string $title |
98
|
|
|
* @return GalleryHasMedia |
99
|
|
|
*/ |
100
|
|
|
public function setTitle($title) |
101
|
|
|
{ |
102
|
|
|
$this->title = $title; |
103
|
|
|
|
104
|
|
|
return $this; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Get description |
109
|
|
|
* |
110
|
|
|
* @return string |
111
|
|
|
*/ |
112
|
11 |
|
public function getDescription() |
113
|
|
|
{ |
114
|
11 |
|
return $this->description; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
/** |
118
|
|
|
* Set description |
119
|
|
|
* |
120
|
|
|
* @param string $description |
121
|
|
|
* @return GalleryHasMedia |
122
|
|
|
*/ |
123
|
|
|
public function setDescription($description) |
124
|
|
|
{ |
125
|
|
|
$this->description = $description; |
126
|
|
|
|
127
|
|
|
return $this; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @param string $locale |
132
|
|
|
*/ |
133
|
|
|
public function setLocale($locale) |
134
|
|
|
{ |
135
|
|
|
$this->locale = $locale; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return string |
140
|
|
|
*/ |
141
|
|
|
public function getLocale() |
142
|
|
|
{ |
143
|
|
|
return $this->locale; |
144
|
|
|
} |
145
|
|
|
} |
146
|
|
|
|
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.