|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <?php
-
- namespace Lc\PietroBundle\Model\Workshop;
-
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- use Lc\SovBundle\Doctrine\EntityInterface;
- use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class Workshop extends AbstractFullEntity implements WorkshopInterface, EntityInterface
- {
- /**
- * @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Workshop\WorkshopThematicInterface", inversedBy="workshops")
- */
- protected $workshopThematic;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\PietroBundle\Model\Workshop\TypeInterface", inversedBy="workshops")
- */
- protected $type;
-
- /**
- * @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\Workshop\EntryInterface", mappedBy="workshop", cascade={"persist", "remove"})
- */
- protected $entries;
-
- /**
- * @ORM\Column(type="string", length=256, nullable=true)
- */
- protected $hook;
-
- /**
- * @ORM\OneToMany(targetEntity="Lc\PietroBundle\Model\Workshop\SolutionInterface", mappedBy="workshop", cascade={"persist", "remove"})
- */
- protected $solutions;
-
- /**
- * @ORM\Column(type="string", length=256, nullable=true)
- */
- protected $videoLink;
-
- /**
- * @ORM\Column(type="string", length=180, nullable=true)
- */
- protected $emailContact;
-
- /**
- * @ORM\Column(type="string", length=256, nullable=true)
- */
- protected $website;
-
- public function __construct()
- {
- $this->entries = new ArrayCollection();
- }
-
- public function __toString()
- {
- return $this->getTitle();
- }
-
- public function getWorkshopThematic(): ?WorkshopThematicInterface
- {
- return $this->workshopThematic;
- }
-
- public function setWorkshopThematic(WorkshopThematicInterface $workshopThematic): self
- {
- $this->workshopThematic = $workshopThematic;
-
- return $this;
- }
-
- public function getType(): ?TypeInterface
- {
- return $this->type;
- }
-
- public function setType(TypeInterface $type): self
- {
- $this->type = $type;
-
- return $this;
- }
-
- /**
- * @return Collection|EntryInterface[]
- */
- public function getEntries(): Collection
- {
- return $this->entries;
- }
-
- public function addEntry(EntryInterface $entry): self
- {
- if (!$this->entries->contains($entry)) {
- $this->entries[] = $entry;
- }
-
- return $this;
- }
-
- public function removeEntry(EntryInterface $entry): self
- {
- if ($this->entries->contains($entry)) {
- $this->entries->removeElement($entry);
- }
-
- return $this;
- }
-
- public function getHook(): ?string
- {
- return $this->hook;
- }
-
- public function setHook(string $hook): self
- {
- $this->hook = $hook;
-
- return $this;
- }
-
- public function getVideoLink(): ?string
- {
- return $this->videoLink;
- }
-
- public function setVideoLink(?string $videoLink): self
- {
- $this->videoLink = $videoLink;
-
- return $this;
- }
-
- /**
- * @return Collection|SolutionInterface[]
- */
- public function getSolutions(): Collection
- {
- return $this->solutions;
- }
-
- public function addSolution(SolutionInterface $solution): self
- {
- if (!$this->solutions->contains($solution)) {
- $this->solutions[] = $solution;
- }
-
- return $this;
- }
-
- public function removeSolution(SolutionInterface $solution): self
- {
- if ($this->solutions->contains($solution)) {
- $this->solutions->removeElement($solution);
- }
-
- return $this;
- }
-
- public function getEmailContact(): ?string
- {
- return $this->emailContact;
- }
-
- public function setEmailContact(string $emailContact): self
- {
- $this->emailContact = $emailContact;
-
- return $this;
- }
-
- public function getWebsite(): ?string
- {
- return $this->website;
- }
-
- public function setWebsite(string $website): self
- {
- $this->website = $website;
-
- return $this;
- }
- }
|