src/AppBundle/Entity/PageDefault.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\TemplateATrait;
  4. use Core\Entity\Traits\EntityTrait;
  5. use Core\Entity\Traits\PageTrait;
  6. use Core\Entity\Traits\TranslatableTrait;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\HttpFoundation\File\File;
  10. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  11. /**
  12.  * @Vich\Uploadable
  13.  * @ORM\Entity(repositoryClass="App\Repository\PageDefaultRepository")
  14.  * @ORM\Table(name="app_page_default")
  15.  */
  16. class PageDefault
  17. {
  18.     use TranslatableTrait;
  19.     use EntityTrait {
  20.         EntityTrait::__construct as private __entityConstruct;
  21.     }
  22.     use PageTrait {
  23.         PageTrait::__construct as private __pageConstruct;
  24.     }
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="App\Entity\PageText", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
  27.      */
  28.     private $texts;
  29.     /**
  30.      * @ORM\OneToMany(targetEntity="App\Entity\PageImage", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
  31.      */
  32.     private $images;
  33.     /**
  34.      * @ORM\OneToMany(targetEntity="App\Entity\PageSlide", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
  35.      */
  36.     private $slides;
  37.     /**
  38.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
  39.      */
  40.     private $items;
  41.     /**
  42.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_temoignage", cascade={"persist", "remove"}, orphanRemoval=true)
  43.      */
  44.     private $temoignages;
  45.     /**
  46.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_accompagnement", cascade={"persist", "remove"}, orphanRemoval=true)
  47.      */
  48.     private $accompagnements;
  49.     /**
  50.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_ebook", cascade={"persist", "remove"}, orphanRemoval=true)
  51.      */
  52.     private $ebooks;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_soin", cascade={"persist", "remove"}, orphanRemoval=true)
  55.      */
  56.     private $soins;
  57.     /**
  58.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_goal", cascade={"persist", "remove"}, orphanRemoval=true)
  59.      */
  60.     private $goals;
  61.     /**
  62.      * @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_diagnostic", cascade={"persist", "remove"}, orphanRemoval=true)
  63.      */
  64.     private $diagnostics;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="App\Entity\PageBreadcrumb", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
  67.      */
  68.     private $breadcrumbs;
  69.     private $collections = [
  70.         'image','slide''text''breadcrumb''item''goal''soin''temoignage''accompagnement''ebook''diagnostic'
  71.     ];
  72.     /**
  73.      * Constructeur
  74.      * @throws \Exception
  75.      */
  76.     public function __construct()
  77.     {
  78.         $this->__entityConstruct();
  79.         $this->__pageConstruct();
  80.         $this->images = new ArrayCollection();
  81.         $this->slides = new ArrayCollection();
  82.         $this->texts = new ArrayCollection();
  83.         $this->breadcrumbs = new ArrayCollection();
  84.         $this->items = new ArrayCollection();
  85.         $this->temoignages = new ArrayCollection();
  86.         $this->ebooks = new ArrayCollection();
  87.         $this->accompagnements = new ArrayCollection();
  88.         $this->diagnostics = new ArrayCollection();
  89.         $this->soins = new ArrayCollection();
  90.         $this->goals = new ArrayCollection();
  91.     }
  92.     public function getCollections()
  93.     {
  94.         return $this->collections;
  95.     }
  96.     /**
  97.      * Collection - Items
  98.      */
  99.     public function getItems()
  100.     {
  101.         return $this->items;
  102.     }
  103.     public function setItems($items)
  104.     {
  105.         $this->items $items;
  106.         return $this;
  107.     }
  108.     public function addItem($item)
  109.     {
  110.         $this->items->add($item);
  111.         $item->setPageDefault($this);
  112.         return $this;
  113.     }
  114.     public function removeItem($item)
  115.     {
  116.         $this->items->removeElement($item);
  117.         return $this;
  118.     }
  119.     /**
  120.      * Collection - Temoignages
  121.      */
  122.     public function getTemoignages()
  123.     {
  124.         return $this->temoignages;
  125.     }
  126.     public function setTemoignages($temoignages)
  127.     {
  128.         $this->temoignages $temoignages;
  129.         return $this;
  130.     }
  131.     public function addTemoignage($temoignage)
  132.     {
  133.         $this->temoignages->add($temoignage);
  134.         $temoignage->setPageDefaultTemoignage($this);
  135.         return $this;
  136.     }
  137.     public function removeTemoignage($temoignage)
  138.     {
  139.         $this->temoignages->removeElement($temoignage);
  140.         return $this;
  141.     }
  142.     /**
  143.      * Collection - Ebooks
  144.      */
  145.     public function getEbooks()
  146.     {
  147.         return $this->ebooks;
  148.     }
  149.     public function setEbooks($ebooks)
  150.     {
  151.         $this->ebooks $ebooks;
  152.         return $this;
  153.     }
  154.     public function addEbook($ebook)
  155.     {
  156.         $this->ebooks->add($ebook);
  157.         $ebook->setPageDefaultEbook($this);
  158.         return $this;
  159.     }
  160.     public function removeEbook($ebook)
  161.     {
  162.         $this->ebooks->removeElement($ebook);
  163.         return $this;
  164.     }
  165.     /**
  166.      * Collection - Soins
  167.      */
  168.     public function getSoins()
  169.     {
  170.         return $this->getCollectionSortBySortorder($this->soins);
  171.     }
  172.     public function setSoins($soins)
  173.     {
  174.         $this->soins $soins;
  175.         return $this;
  176.     }
  177.     public function addSoin($soin)
  178.     {
  179.         $this->soins->add($soin);
  180.         $soin->setPageDefaultSoin($this);
  181.         return $this;
  182.     }
  183.     public function removeSoin($soin)
  184.     {
  185.         $this->soins->removeElement($soin);
  186.         return $this;
  187.     }
  188.     /**
  189.      * Collection - Goals
  190.      */
  191.     public function getGoals()
  192.     {
  193.         return $this->goals;
  194.     }
  195.     public function setGoals($goals)
  196.     {
  197.         $this->goals $goals;
  198.         return $this;
  199.     }
  200.     public function addGoal($goal)
  201.     {
  202.         $this->goals->add($goal);
  203.         $goal->setPageDefaultGoal($this);
  204.         return $this;
  205.     }
  206.     public function removeGoal($goal)
  207.     {
  208.         $this->goals->removeElement($goal);
  209.         return $this;
  210.     }
  211.     /**
  212.      * Collection - Breadcrumbs
  213.      */
  214.     public function getBreadcrumbs()
  215.     {
  216.         return $this->breadcrumbs;
  217.     }
  218.     public function setBreadcrumbs($breadcrumbs)
  219.     {
  220.         $this->breadcrumbs $breadcrumbs;
  221.         return $this;
  222.     }
  223.     public function addBreadcrumb($breadcrumb)
  224.     {
  225.         $this->breadcrumbs->add($breadcrumb);
  226.         $breadcrumb->setPageDefault($this);
  227.         return $this;
  228.     }
  229.     public function removeBreadcrumb($breadcrumb)
  230.     {
  231.         $this->breadcrumbs->removeElement($breadcrumb);
  232.         return $this;
  233.     }
  234.     /**
  235.      * Collection - Texts
  236.      */
  237.     public function getTexts()
  238.     {
  239.         return $this->getCollectionSortBySortorder($this->texts);
  240.     }
  241.     public function getTextsArray()
  242.     {
  243.         return $this->getCollectionArraySortBySortorder($this->texts);
  244.     }
  245.     public function setTexts($items)
  246.     {
  247.         $this->texts $items;
  248.         return $this;
  249.     }
  250.     public function addText($item)
  251.     {
  252.         $this->texts->add($item);
  253.         $item->setPageDefault($this);
  254.         return $this;
  255.     }
  256.     public function removeText($item)
  257.     {
  258.         $this->texts->removeElement($item);
  259.         return $this;
  260.     }
  261.     /**
  262.      * Collection - Images
  263.      */
  264.     public function getImages()
  265.     {
  266.         return $this->getCollectionSortBySortorder($this->images);
  267.     }
  268.     public function getImagesArray()
  269.     {
  270.         return $this->getCollectionArraySortBySortorder($this->images);
  271.     }
  272.     public function setImages($items)
  273.     {
  274.         $this->images $items;
  275.         return $this;
  276.     }
  277.     public function addImage($item)
  278.     {
  279.         $this->images->add($item);
  280.         $item->setPageDefault($this);
  281.         return $this;
  282.     }
  283.     public function removeImage($item)
  284.     {
  285.         $this->images->removeElement($item);
  286.         return $this;
  287.     }
  288.     /**
  289.      * Collection - Slides
  290.      */
  291.     public function getSlides()
  292.     {
  293.         return $this->getCollectionSortBySortorder($this->slides);
  294.     }
  295.     public function setSlides($items)
  296.     {
  297.         $this->slides $items;
  298.         return $this;
  299.     }
  300.     public function addSlide($item)
  301.     {
  302.         $this->slides->add($item);
  303.         $item->setPageDefault($this);
  304.         return $this;
  305.     }
  306.     public function removeSlide($item)
  307.     {
  308.         $this->slides->removeElement($item);
  309.         return $this;
  310.     }
  311.     /**
  312.      * Collection - Accompagnements
  313.      */
  314.     public function getAccompagnements()
  315.     {
  316.         return $this->accompagnements;
  317.     }
  318.     public function setAccompagnements($accompagnements)
  319.     {
  320.         $this->accompagnements $accompagnements;
  321.         return $this;
  322.     }
  323.     public function addAccompagnement($accompagnement)
  324.     {
  325.         $this->accompagnements->add($accompagnement);
  326.         $accompagnement->setPageDefaultAccompagnement($this);
  327.         return $this;
  328.     }
  329.     public function removeAccompagnement($accompagnement)
  330.     {
  331.         $this->accompagnements->removeElement($accompagnement);
  332.         return $this;
  333.     }
  334.     /**
  335.      * Collection - Diagnostics
  336.      */
  337.     public function getDiagnostics()
  338.     {
  339.         return $this->diagnostics;
  340.     }
  341.     public function setDiagnostics($diagnostics)
  342.     {
  343.         $this->diagnostics $diagnostics;
  344.         return $this;
  345.     }
  346.     public function addDiagnostic($diagnostic)
  347.     {
  348.         $this->diagnostics->add($diagnostic);
  349.         $diagnostic->setPageDefaultDiagnostic($this);
  350.         return $this;
  351.     }
  352.     public function removeDiagnostic($diagnostic)
  353.     {
  354.         $this->diagnostics->removeElement($diagnostic);
  355.         return $this;
  356.     }
  357. }