src/Entity/MediaCategorie.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MediaCategorieRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=MediaCategorieRepository::class)
  9. */
  10. class MediaCategorie
  11. {
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\Column(type="string", length=255)
  20. */
  21. private $name;
  22. /**
  23. * @ORM\Column(type="json")
  24. */
  25. private $allowedFormat = [];
  26. /**
  27. * @ORM\OneToMany(targetEntity=SejourSessionMediaCategorie::class, mappedBy="mediaCategorie")
  28. */
  29. private $sejourSessionMediaCategories;
  30. /**
  31. * @ORM\OneToMany(targetEntity=Media::class, mappedBy="MediaCategorie")
  32. */
  33. private $media;
  34. /**
  35. * @ORM\OneToMany(targetEntity=ContactMediaCategorie::class, mappedBy="category")
  36. */
  37. private $contactMediaCategories;
  38. /**
  39. * @ORM\Column(type="string", length=255)
  40. */
  41. private $type;
  42. /**
  43. * @ORM\Column(type="boolean", nullable=true)
  44. */
  45. private $isMandatory;
  46. /**
  47. * @ORM\Column(type="boolean", nullable=true)
  48. */
  49. private $isEditableByDirector;
  50. /**
  51. * @ORM\OneToMany(targetEntity=ArticleMediaCategorie::class, mappedBy="category")
  52. */
  53. private $articleMediaCategories;
  54. /**
  55. * @ORM\Column(type="boolean", nullable=true)
  56. */
  57. private $hasFillInProcess;
  58. /**
  59. * @ORM\Column(type="boolean", nullable=true)
  60. */
  61. private $hasToBeReturned;
  62. /**
  63. * @ORM\Column(type="boolean", nullable=true)
  64. */
  65. private $hasPrio;
  66. /**
  67. * @ORM\Column(type="json", nullable=true)
  68. */
  69. private $publishedIn = [];
  70. /**
  71. * @ORM\Column(type="string", length=255, nullable=true)
  72. */
  73. private $modele;
  74. /**
  75. * @ORM\Column(type="json", nullable=true)
  76. */
  77. private $Fields = [];
  78. /**
  79. * @ORM\Column(type="boolean", nullable=true)
  80. */
  81. private $isUnique;
  82. /**
  83. * @ORM\Column(type="boolean", nullable=true)
  84. */
  85. private $isDeletable;
  86. /**
  87. * @ORM\Column(type="boolean", nullable=true)
  88. */
  89. private $isEspaceParent;
  90. /**
  91. * @ORM\Column(type="boolean", nullable=true)
  92. */
  93. private $isEspaceDirecteur;
  94. /**
  95. * @ORM\Column(type="boolean", nullable=true)
  96. */
  97. private $isPrivate;
  98. /**
  99. * @ORM\Column(type="boolean", nullable=true)
  100. */
  101. private $isFactory;
  102. /**
  103. * @ORM\Column(type="boolean", nullable=true)
  104. */
  105. private $isInAdmin;
  106. /**
  107. * @ORM\Column(type="string", length=255, nullable=true)
  108. */
  109. private $modeleEntity;
  110. /**
  111. * @ORM\Column(type="boolean", nullable=true)
  112. */
  113. private $hasToBeValidateByAdmin;
  114. /**
  115. * @ORM\ManyToOne(targetEntity=InteractionTemplate::class)
  116. */
  117. private $interactionTemplate;
  118. /**
  119. * @ORM\Column(type="string", length=255, nullable=true)
  120. */
  121. private $referent;
  122. /**
  123. * @ORM\Column(type="integer", nullable=true)
  124. */
  125. private ?int $interval = null;
  126. public function __construct()
  127. {
  128. $this->sejourSessionMediaCategories = new ArrayCollection();
  129. $this->media = new ArrayCollection();
  130. $this->contactMediaCategories = new ArrayCollection();
  131. $this->articleMediaCategories = new ArrayCollection();
  132. $this->type = "General";
  133. }
  134. public function getId(): ?int
  135. {
  136. return $this->id;
  137. }
  138. public function getName(): ?string
  139. {
  140. return $this->name;
  141. }
  142. public function setName(string $name): self
  143. {
  144. $this->name = $name;
  145. return $this;
  146. }
  147. public function getAllowedFormat(): ?array
  148. {
  149. return $this->allowedFormat;
  150. }
  151. public function setAllowedFormat(array $allowedFormat): self
  152. {
  153. $this->allowedFormat = $allowedFormat;
  154. return $this;
  155. }
  156. /**
  157. * @return Collection|SejourSessionMediaCategorie[]
  158. */
  159. public function getSejourSessionMediaCategories(): Collection
  160. {
  161. return $this->sejourSessionMediaCategories;
  162. }
  163. public function addSejourSessionMediaCategorie(SejourSessionMediaCategorie $sejourSessionMediaCategorie): self
  164. {
  165. if (!$this->sejourSessionMediaCategories->contains($sejourSessionMediaCategorie)) {
  166. $this->sejourSessionMediaCategories[] = $sejourSessionMediaCategorie;
  167. $sejourSessionMediaCategorie->setMediaCategorie($this);
  168. }
  169. return $this;
  170. }
  171. public function removeSejourSessionMediaCategorie(SejourSessionMediaCategorie $sejourSessionMediaCategorie): self
  172. {
  173. if ($this->sejourSessionMediaCategories->removeElement($sejourSessionMediaCategorie)) {
  174. // set the owning side to null (unless already changed)
  175. if ($sejourSessionMediaCategorie->getMediaCategorie() === $this) {
  176. $sejourSessionMediaCategorie->setMediaCategorie(null);
  177. }
  178. }
  179. return $this;
  180. }
  181. /**
  182. * @return Collection|Media[]
  183. */
  184. public function getMedia(): Collection
  185. {
  186. return $this->media;
  187. }
  188. public function addMedium(Media $medium): self
  189. {
  190. if (!$this->media->contains($medium)) {
  191. $this->media[] = $medium;
  192. $medium->setMediaCategorie($this);
  193. }
  194. return $this;
  195. }
  196. public function removeMedium(Media $medium): self
  197. {
  198. if ($this->media->removeElement($medium)) {
  199. // set the owning side to null (unless already changed)
  200. if ($medium->getMediaCategorie() === $this) {
  201. $medium->setMediaCategorie(null);
  202. }
  203. }
  204. return $this;
  205. }
  206. /**
  207. * @return Collection|ContactMediaCategorie[]
  208. */
  209. public function getContactMediaCategories(): Collection
  210. {
  211. return $this->contactMediaCategories;
  212. }
  213. public function addContactMediaCategory(ContactMediaCategorie $contactMediaCategory): self
  214. {
  215. if (!$this->contactMediaCategories->contains($contactMediaCategory)) {
  216. $this->contactMediaCategories[] = $contactMediaCategory;
  217. $contactMediaCategory->setCategory($this);
  218. }
  219. return $this;
  220. }
  221. public function removeContactMediaCategory(ContactMediaCategorie $contactMediaCategory): self
  222. {
  223. if ($this->contactMediaCategories->removeElement($contactMediaCategory)) {
  224. // set the owning side to null (unless already changed)
  225. if ($contactMediaCategory->getCategory() === $this) {
  226. $contactMediaCategory->setCategory(null);
  227. }
  228. }
  229. return $this;
  230. }
  231. public function getType(): ?string
  232. {
  233. return $this->type;
  234. }
  235. public function setType(string $type): self
  236. {
  237. $this->type = $type;
  238. return $this;
  239. }
  240. public function getIsMandatory(): ?bool
  241. {
  242. return $this->isMandatory;
  243. }
  244. public function setIsMandatory(?bool $isMandatory): self
  245. {
  246. $this->isMandatory = $isMandatory;
  247. return $this;
  248. }
  249. public function getIsEditableByDirector(): ?bool
  250. {
  251. return $this->isEditableByDirector;
  252. }
  253. public function setIsEditableByDirector(?bool $isEditable): self
  254. {
  255. $this->isEditableByDirector = $isEditable;
  256. return $this;
  257. }
  258. /**
  259. * @return Collection|ArticleMediaCategorie[]
  260. */
  261. public function getArticleMediaCategories(): Collection
  262. {
  263. return $this->articleMediaCategories;
  264. }
  265. public function addArticleMediaCategory(ArticleMediaCategorie $articleMediaCategory): self
  266. {
  267. if (!$this->articleMediaCategories->contains($articleMediaCategory)) {
  268. $this->articleMediaCategories[] = $articleMediaCategory;
  269. $articleMediaCategory->setCategory($this);
  270. }
  271. return $this;
  272. }
  273. public function removeArticleMediaCategory(ArticleMediaCategorie $articleMediaCategory): self
  274. {
  275. if ($this->articleMediaCategories->removeElement($articleMediaCategory)) {
  276. // set the owning side to null (unless already changed)
  277. if ($articleMediaCategory->getCategory() === $this) {
  278. $articleMediaCategory->setCategory(null);
  279. }
  280. }
  281. return $this;
  282. }
  283. public function getHasFillInProcess(): ?bool
  284. {
  285. return $this->hasFillInProcess;
  286. }
  287. public function setHasFillInProcess(?bool $hasFillInProcess): self
  288. {
  289. $this->hasFillInProcess = $hasFillInProcess;
  290. return $this;
  291. }
  292. public function getHasToBeReturned(): ?bool
  293. {
  294. return $this->hasToBeReturned;
  295. }
  296. public function setHasToBeReturned(?bool $hasToBeReturned): self
  297. {
  298. $this->hasToBeReturned = $hasToBeReturned;
  299. return $this;
  300. }
  301. public function getHasPrio(): ?bool
  302. {
  303. return $this->hasPrio;
  304. }
  305. public function setHasPrio(?bool $hasPrio): self
  306. {
  307. $this->hasPrio = $hasPrio;
  308. return $this;
  309. }
  310. public function getPublishedIn(): ?array
  311. {
  312. return $this->publishedIn;
  313. }
  314. public function setPublishedIn(array $publishedIn): self
  315. {
  316. $this->publishedIn = $publishedIn;
  317. return $this;
  318. }
  319. public function getModele(): ?string
  320. {
  321. return $this->modele;
  322. }
  323. public function setModele(?string $modele): self
  324. {
  325. $this->modele = $modele;
  326. return $this;
  327. }
  328. public function getFields(): ?array
  329. {
  330. return $this->Fields;
  331. }
  332. public function setFields(?array $Fields): self
  333. {
  334. $this->Fields = $Fields;
  335. return $this;
  336. }
  337. public function getIsUnique(): ?bool
  338. {
  339. return $this->isUnique;
  340. }
  341. public function setIsUnique(?bool $isUnique): self
  342. {
  343. $this->isUnique = $isUnique;
  344. return $this;
  345. }
  346. public function getIsDeletable(): ?bool
  347. {
  348. return $this->isDeletable;
  349. }
  350. public function setIsDeletable(?bool $isDeletable): self
  351. {
  352. $this->isDeletable = $isDeletable;
  353. return $this;
  354. }
  355. public function getIsEspaceParent(): ?bool
  356. {
  357. return $this->isEspaceParent;
  358. }
  359. public function setIsEspaceParent(?bool $isEspaceParent): self
  360. {
  361. $this->isEspaceParent = $isEspaceParent;
  362. return $this;
  363. }
  364. public function getIsEspaceDirecteur(): ?bool
  365. {
  366. return $this->isEspaceDirecteur;
  367. }
  368. public function setIsEspaceDirecteur(?bool $isEspaceDirecteur): self
  369. {
  370. $this->isEspaceDirecteur = $isEspaceDirecteur;
  371. return $this;
  372. }
  373. public function getIsPrivate(): ?bool
  374. {
  375. return $this->isPrivate;
  376. }
  377. public function setIsPrivate(?bool $isPrivate): self
  378. {
  379. $this->isPrivate = $isPrivate;
  380. return $this;
  381. }
  382. public function getIsFactory(): ?bool
  383. {
  384. return $this->isFactory;
  385. }
  386. public function setIsFactory(?bool $isFactory): self
  387. {
  388. $this->isFactory = $isFactory;
  389. return $this;
  390. }
  391. public function getIsInAdmin(): ?bool
  392. {
  393. return $this->isInAdmin;
  394. }
  395. public function setIsInAdmin(?bool $isInAdmin): self
  396. {
  397. $this->isInAdmin = $isInAdmin;
  398. return $this;
  399. }
  400. public function getModeleEntity(): ?string
  401. {
  402. return $this->modeleEntity;
  403. }
  404. public function setModeleEntity(?string $modeleEntity): self
  405. {
  406. $this->modeleEntity = $modeleEntity;
  407. return $this;
  408. }
  409. public function getHasToBeValidateByAdmin(): ?bool
  410. {
  411. return $this->hasToBeValidateByAdmin;
  412. }
  413. public function setHasToBeValidateByAdmin(?bool $hasToBeValidateByAdmin): self
  414. {
  415. $this->hasToBeValidateByAdmin = $hasToBeValidateByAdmin;
  416. return $this;
  417. }
  418. public function getInteractionTemplate(): ?InteractionTemplate
  419. {
  420. return $this->interactionTemplate;
  421. }
  422. public function setInteractionTemplate(?InteractionTemplate $interactionTemplate): self
  423. {
  424. $this->interactionTemplate = $interactionTemplate;
  425. return $this;
  426. }
  427. public function getReferent(): ?string
  428. {
  429. return $this->referent;
  430. }
  431. public function setReferent(?string $referent): self
  432. {
  433. $this->referent = $referent;
  434. return $this;
  435. }
  436. public function getInterval(): ?int
  437. {
  438. return $this->interval;
  439. }
  440. public function setInterval(?int $interval): self
  441. {
  442. $this->interval = $interval;
  443. return $this;
  444. }
  445. }