1 | <?php |
||
19 | class ArticleTranslation |
||
20 | { |
||
21 | use Translation; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | * |
||
26 | * @Assert\NotBlank() |
||
27 | * @ORM\Column(name="name", type="string", length=255) |
||
28 | * @Serializer\Groups({"search"}) |
||
29 | * @VIC\BusinessProperty({"textable", "seoable"}) |
||
30 | */ |
||
31 | protected $name; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | * |
||
36 | * @Assert\NotBlank(groups={"edition"}) |
||
37 | * @Gedmo\Slug(handlers={ |
||
38 | * @Gedmo\SlugHandler(class="Victoire\Bundle\BusinessEntityBundle\Handler\TwigSlugHandler" |
||
39 | * )},fields={"name"}, updatable=false, unique=false) |
||
40 | * @ORM\Column(name="slug", type="string", length=255) |
||
41 | * @VIC\BusinessProperty("businessParameter") |
||
42 | */ |
||
43 | protected $slug; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | * |
||
48 | * @ORM\ManyToOne(targetEntity="\Victoire\Bundle\MediaBundle\Entity\Media") |
||
49 | * @ORM\JoinColumn(name="image_id", referencedColumnName="id", onDelete="CASCADE") |
||
50 | * @VIC\BusinessProperty("imageable") |
||
51 | */ |
||
52 | private $image; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | * |
||
57 | * @ORM\Column(name="description", type="text", nullable=true) |
||
58 | * @VIC\BusinessProperty({"textable", "seoable"}) |
||
59 | */ |
||
60 | private $description; |
||
61 | |||
62 | /** |
||
63 | * Get name. |
||
64 | * |
||
65 | * @return string |
||
66 | */ |
||
67 | public function getName() |
||
71 | |||
72 | /** |
||
73 | * Set name. |
||
74 | * |
||
75 | * @param string $name |
||
76 | * |
||
77 | * @return View |
||
78 | */ |
||
79 | public function setName($name) |
||
85 | |||
86 | /** |
||
87 | * Set slug. |
||
88 | * |
||
89 | * @param string $slug |
||
90 | * |
||
91 | * @return View |
||
92 | */ |
||
93 | public function setSlug($slug) |
||
99 | |||
100 | /** |
||
101 | * Get slug. |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getSlug() |
||
109 | |||
110 | /** |
||
111 | * Get description. |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | public function getDescription() |
||
119 | |||
120 | /** |
||
|
|||
121 | * Set category. |
||
122 | * |
||
123 | * @param string $category |
||
124 | * |
||
125 | * @return Article |
||
126 | */ |
||
127 | public function setDescription($description) |
||
133 | |||
134 | /** |
||
135 | * Set image. |
||
136 | * |
||
137 | * @param Media $image |
||
138 | * |
||
139 | * @return ArticleTranslation |
||
140 | */ |
||
141 | public function setImage(Media $image = null) |
||
147 | |||
148 | /** |
||
149 | * Get image. |
||
150 | * |
||
151 | * @return string |
||
152 | */ |
||
153 | public function getImage() |
||
157 | } |
||
158 |