<?php
namespace App\Entity;
use App\Entity\Traits\TemplateATrait;
use Core\Entity\Traits\EntityTrait;
use Core\Entity\Traits\PageTrait;
use Core\Entity\Traits\TranslatableTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @Vich\Uploadable
* @ORM\Entity(repositoryClass="App\Repository\PageDefaultRepository")
* @ORM\Table(name="app_page_default")
*/
class PageDefault
{
use TranslatableTrait;
use EntityTrait {
EntityTrait::__construct as private __entityConstruct;
}
use PageTrait {
PageTrait::__construct as private __pageConstruct;
}
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageText", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $texts;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageImage", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $images;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageSlide", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $slides;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $items;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_temoignage", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $temoignages;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_accompagnement", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $accompagnements;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_ebook", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $ebooks;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_soin", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $soins;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_goal", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $goals;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageItem", mappedBy="page_default_diagnostic", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $diagnostics;
/**
* @ORM\OneToMany(targetEntity="App\Entity\PageBreadcrumb", mappedBy="page_default", cascade={"persist", "remove"}, orphanRemoval=true)
*/
private $breadcrumbs;
private $collections = [
'image','slide', 'text', 'breadcrumb', 'item', 'goal', 'soin', 'temoignage', 'accompagnement', 'ebook', 'diagnostic'
];
/**
* Constructeur
* @throws \Exception
*/
public function __construct()
{
$this->__entityConstruct();
$this->__pageConstruct();
$this->images = new ArrayCollection();
$this->slides = new ArrayCollection();
$this->texts = new ArrayCollection();
$this->breadcrumbs = new ArrayCollection();
$this->items = new ArrayCollection();
$this->temoignages = new ArrayCollection();
$this->ebooks = new ArrayCollection();
$this->accompagnements = new ArrayCollection();
$this->diagnostics = new ArrayCollection();
$this->soins = new ArrayCollection();
$this->goals = new ArrayCollection();
}
public function getCollections()
{
return $this->collections;
}
/**
* Collection - Items
*/
public function getItems()
{
return $this->items;
}
public function setItems($items)
{
$this->items = $items;
return $this;
}
public function addItem($item)
{
$this->items->add($item);
$item->setPageDefault($this);
return $this;
}
public function removeItem($item)
{
$this->items->removeElement($item);
return $this;
}
/**
* Collection - Temoignages
*/
public function getTemoignages()
{
return $this->temoignages;
}
public function setTemoignages($temoignages)
{
$this->temoignages = $temoignages;
return $this;
}
public function addTemoignage($temoignage)
{
$this->temoignages->add($temoignage);
$temoignage->setPageDefaultTemoignage($this);
return $this;
}
public function removeTemoignage($temoignage)
{
$this->temoignages->removeElement($temoignage);
return $this;
}
/**
* Collection - Ebooks
*/
public function getEbooks()
{
return $this->ebooks;
}
public function setEbooks($ebooks)
{
$this->ebooks = $ebooks;
return $this;
}
public function addEbook($ebook)
{
$this->ebooks->add($ebook);
$ebook->setPageDefaultEbook($this);
return $this;
}
public function removeEbook($ebook)
{
$this->ebooks->removeElement($ebook);
return $this;
}
/**
* Collection - Soins
*/
public function getSoins()
{
return $this->getCollectionSortBySortorder($this->soins);
}
public function setSoins($soins)
{
$this->soins = $soins;
return $this;
}
public function addSoin($soin)
{
$this->soins->add($soin);
$soin->setPageDefaultSoin($this);
return $this;
}
public function removeSoin($soin)
{
$this->soins->removeElement($soin);
return $this;
}
/**
* Collection - Goals
*/
public function getGoals()
{
return $this->goals;
}
public function setGoals($goals)
{
$this->goals = $goals;
return $this;
}
public function addGoal($goal)
{
$this->goals->add($goal);
$goal->setPageDefaultGoal($this);
return $this;
}
public function removeGoal($goal)
{
$this->goals->removeElement($goal);
return $this;
}
/**
* Collection - Breadcrumbs
*/
public function getBreadcrumbs()
{
return $this->breadcrumbs;
}
public function setBreadcrumbs($breadcrumbs)
{
$this->breadcrumbs = $breadcrumbs;
return $this;
}
public function addBreadcrumb($breadcrumb)
{
$this->breadcrumbs->add($breadcrumb);
$breadcrumb->setPageDefault($this);
return $this;
}
public function removeBreadcrumb($breadcrumb)
{
$this->breadcrumbs->removeElement($breadcrumb);
return $this;
}
/**
* Collection - Texts
*/
public function getTexts()
{
return $this->getCollectionSortBySortorder($this->texts);
}
public function getTextsArray()
{
return $this->getCollectionArraySortBySortorder($this->texts);
}
public function setTexts($items)
{
$this->texts = $items;
return $this;
}
public function addText($item)
{
$this->texts->add($item);
$item->setPageDefault($this);
return $this;
}
public function removeText($item)
{
$this->texts->removeElement($item);
return $this;
}
/**
* Collection - Images
*/
public function getImages()
{
return $this->getCollectionSortBySortorder($this->images);
}
public function getImagesArray()
{
return $this->getCollectionArraySortBySortorder($this->images);
}
public function setImages($items)
{
$this->images = $items;
return $this;
}
public function addImage($item)
{
$this->images->add($item);
$item->setPageDefault($this);
return $this;
}
public function removeImage($item)
{
$this->images->removeElement($item);
return $this;
}
/**
* Collection - Slides
*/
public function getSlides()
{
return $this->getCollectionSortBySortorder($this->slides);
}
public function setSlides($items)
{
$this->slides = $items;
return $this;
}
public function addSlide($item)
{
$this->slides->add($item);
$item->setPageDefault($this);
return $this;
}
public function removeSlide($item)
{
$this->slides->removeElement($item);
return $this;
}
/**
* Collection - Accompagnements
*/
public function getAccompagnements()
{
return $this->accompagnements;
}
public function setAccompagnements($accompagnements)
{
$this->accompagnements = $accompagnements;
return $this;
}
public function addAccompagnement($accompagnement)
{
$this->accompagnements->add($accompagnement);
$accompagnement->setPageDefaultAccompagnement($this);
return $this;
}
public function removeAccompagnement($accompagnement)
{
$this->accompagnements->removeElement($accompagnement);
return $this;
}
/**
* Collection - Diagnostics
*/
public function getDiagnostics()
{
return $this->diagnostics;
}
public function setDiagnostics($diagnostics)
{
$this->diagnostics = $diagnostics;
return $this;
}
public function addDiagnostic($diagnostic)
{
$this->diagnostics->add($diagnostic);
$diagnostic->setPageDefaultDiagnostic($this);
return $this;
}
public function removeDiagnostic($diagnostic)
{
$this->diagnostics->removeElement($diagnostic);
return $this;
}
}