src/Entity/Educational/Library.php line 22

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. /**
  12.  * aba\DomainBundle\Entity\Domain
  13.  *
  14.  * @ORM\Table()
  15.  * @ORM\Entity(repositoryClass="App\Repository\Management\LibraryRepository")
  16.  */
  17. class Library
  18. {
  19.     use TimestampableTrait;
  20.     /**
  21.      * @var integer $id
  22.      *
  23.      * @ORM\Column(name="id", type="integer")
  24.      * @ORM\Id
  25.      * @ORM\GeneratedValue(strategy="AUTO")
  26.      */
  27.     private $id;
  28.     /**
  29.      * @var string $title
  30.      *
  31.      * @ORM\Column(name="title", type="string", length=255)
  32.      * @Assert\NotBlank()
  33.      */
  34.     private $title;
  35.     /**
  36.      * @var string $content
  37.      *
  38.      * @ORM\Column(name="content", type="text", nullable=true)
  39.      *
  40.      */
  41.     private $content;
  42.     /**
  43.      * @var boolean $slug
  44.      *
  45.      * @ORM\Column(name="`online`", type="boolean")
  46.      *
  47.      */
  48.     private $online;
  49.     /**
  50.      * @var string $position
  51.      *
  52.      * @ORM\Column(name="position", type="integer")
  53.      *
  54.      */
  55.     private $position;
  56.     /**
  57.      * @var string
  58.      *
  59.      * @ORM\Column(name="metadescription", type="text", nullable=true)
  60.      */
  61.     private $metadescription;
  62.     /**************************** Association *********************************/
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity="Course")
  65.      * @ORM\JoinColumn(name="course_id",referencedColumnName="id")
  66.      */
  67.     private $course;
  68.     /**
  69.      * @var Discipline $discipline
  70.      * @ORM\ManyToOne(targetEntity="Discipline")
  71.      * @ORM\JoinColumn(name="disciplines_id",referencedColumnName="id")
  72.      * @ORM\OrderBy({"order" = "ASC"})
  73.      */
  74.     private $discipline;
  75.     /**************************** FIN ***********************************/
  76.     public function __construct()
  77.     {
  78.         $this->position = 0;
  79.         $this->online = false;
  80.     }
  81.     /**
  82.      * @return int
  83.      */
  84.     public function getId()
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getTitle(): string
  89.     {
  90.         return $this->title;
  91.     }
  92.     public function setTitle(string $title): void
  93.     {
  94.         $this->title = $title;
  95.     }
  96.     public function getContent(): string
  97.     {
  98.         return $this->content;
  99.     }
  100.     public function setContent(string $content): void
  101.     {
  102.         $this->content = $content;
  103.     }
  104.     public function getOnline(): ?bool
  105.     {
  106.         return $this->online;
  107.     }
  108.     public function setOnline(string $online): void
  109.     {
  110.         $this->online = $online;
  111.     }
  112.     public function getPosition(): string
  113.     {
  114.         return $this->position;
  115.     }
  116.     public function setPosition(string $position): void
  117.     {
  118.         $this->position = $position;
  119.     }
  120.     public function getMetadescription(): string
  121.     {
  122.         return $this->metadescription;
  123.     }
  124.     public function setMetadescription(string $metadescription): void
  125.     {
  126.         $this->metadescription = $metadescription;
  127.     }
  128.     /**
  129.      * @return mixed
  130.      */
  131.     public function getCourse()
  132.     {
  133.         return $this->course;
  134.     }
  135.     /**
  136.      * @param mixed $course
  137.      */
  138.     public function setCourse($course): void
  139.     {
  140.         $this->course = $course;
  141.     }
  142.     public function getDiscipline(): ?Discipline
  143.     {
  144.         return $this->discipline;
  145.     }
  146.     public function setDiscipline(Discipline $discipline): void
  147.     {
  148.         $this->discipline = $discipline;
  149.     }
  150. }