src/Entity/Educational/Activity.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Educational;
  3. use App\Entity\Educational\Lesson\Exercise\StatementLine;
  4. use App\Entity\Educational\Lesson\WorkListNode;
  5. use App\Model\TimestampableTrait;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. use Symfony\Component\Validator\Constraints as Assert;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use App\Entity\Media\Video;
  12. /**
  13.  * aba\DomainBundle\Entity\Domain
  14.  *
  15.  * @ORM\Table(name="free_activity_notion")
  16.  * @ORM\Entity(repositoryClass="App\Repository\Educational\FreeActivityRepository")
  17.  */
  18. class Activity
  19. {
  20.     use TimestampableTrait;
  21.     /**
  22.      * @var integer $id
  23.      *
  24.      * @ORM\Column(name="id", type="integer")
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue(strategy="AUTO")
  27.      */
  28.     private $id;
  29.     /**
  30.      * @var string $title
  31.      *
  32.      * @ORM\Column(name="title", type="string", length=255)
  33.      * @Assert\NotBlank()
  34.      */
  35.     private $title;
  36.     /**
  37.      * @var string $slug
  38.      * @ORM\Column(name="slug", type="string", length=255)
  39.      * @Gedmo\Slug(fields={"title","id"}, separator="-",unique=true)
  40.      *
  41.      */
  42.     private $slug;
  43.     /**
  44.      * @var string $link
  45.      *
  46.      * @ORM\Column(name="link", type="string", length=255, nullable=true)
  47.      * -
  48.      */
  49.     private $link;
  50.     /**
  51.      * @var string $content
  52.      *
  53.      * @ORM\Column(name="content", type="text", nullable=true)
  54.      *
  55.      */
  56.     private $content;
  57.     /**
  58.      * @var string $slug
  59.      *
  60.      * @ORM\Column(name="`online`", type="boolean")
  61.      *
  62.      */
  63.     private $online;
  64.     /**
  65.      * @var string $position
  66.      *
  67.      * @ORM\Column(name="position", type="integer")
  68.      *
  69.      */
  70.     private $position;
  71.     /**
  72.      * @var string
  73.      *
  74.      * @ORM\Column(name="metadescription", type="text", nullable=true)
  75.      */
  76.     private $metadescription;
  77.     /**************************** Association *********************************/
  78.     /**
  79.      * @ORM\ManyToOne(targetEntity=Video::class)
  80.      * @ORM\JoinColumn(onDelete="CASCADE")
  81.      */
  82.     private $video;
  83.     /**
  84.      * @var Notion $notion
  85.      * @ORM\ManyToOne(targetEntity="Notion" ,inversedBy="activities")
  86.      * @ORM\JoinColumn(onDelete="CASCADE")
  87.      */
  88.     private $notion;
  89.     /**************************** FIN ***********************************/
  90.     public function __construct()
  91.     {
  92.         $this->position = 0;
  93.         $this->online = false;
  94.     }
  95.     /**
  96.      * @return int
  97.      */
  98.     public function getId()
  99.     {
  100.         return $this->id;
  101.     }
  102.     public function getTitle(): string
  103.     {
  104.         return $this->title;
  105.     }
  106.     public function setTitle(string $title): void
  107.     {
  108.         $this->title = $title;
  109.     }
  110.     public function getOnline()
  111.     {
  112.         return $this->online;
  113.     }
  114.     public function setOnline(string $online): void
  115.     {
  116.         $this->online = $online;
  117.     }
  118.     public function getPosition(): string
  119.     {
  120.         return $this->position;
  121.     }
  122.     public function setPosition(string $position): void
  123.     {
  124.         $this->position = $position;
  125.     }
  126.     public function getMetadescription(): ?string
  127.     {
  128.         return $this->metadescription;
  129.     }
  130.     public function setMetadescription(string $metadescription): void
  131.     {
  132.         $this->metadescription = $metadescription;
  133.     }
  134.     /**
  135.      * @return mixed
  136.      */
  137.     public function getCourse()
  138.     {
  139.         return $this->course;
  140.     }
  141.     /**
  142.      * @param mixed $course
  143.      */
  144.     public function setCourse($course): void
  145.     {
  146.         $this->course = $course;
  147.     }
  148.     public function getDiscipline(): Discipline
  149.     {
  150.         return $this->discipline;
  151.     }
  152.     public function setDiscipline(Discipline $discipline): void
  153.     {
  154.         $this->discipline = $discipline;
  155.     }
  156.     public function getContent(): string
  157.     {
  158.         return $this->content;
  159.     }
  160.     public function setContent(string $content): void
  161.     {
  162.         $this->content = $content;
  163.     }
  164.     /**
  165.      * @return mixed
  166.      */
  167.     public function getVideo()
  168.     {
  169.         return $this->video;
  170.     }
  171.     /**
  172.      * @param mixed $video
  173.      */
  174.     public function setVideo($video): void
  175.     {
  176.         $this->video = $video;
  177.     }
  178.     public function getNotion(): ?Notion
  179.     {
  180.         return $this->notion;
  181.     }
  182.     public function setNotion(Notion $notion): void
  183.     {
  184.         $this->notion = $notion;
  185.     }
  186.     public function getLink(): string
  187.     {
  188.         return $this->link;
  189.     }
  190.     public function setLink(string $link): void
  191.     {
  192.         $this->link = $link;
  193.     }
  194.     public function getSlug(): ?string
  195.     {
  196.         return $this->slug;
  197.     }
  198.     public function setSlug(string $slug): void
  199.     {
  200.         $this->slug = $slug;
  201.     }
  202. }