<?php
namespace App\Entity;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\OrderBy;
use App\Repository\PaginaRepository;
/**
* Pagina
*/
#[ORM\Table("Pagina")]
#[ORM\Entity(repositoryClass:"App\Repository\PaginaRepository")]
class Pagina {
/**
* @var integer
*/
#[ORM\Column(name:"id", type:"integer")]
#[ORM\Id]
#[ORM\GeneratedValue(strategy:"AUTO")]
private $id;
/**
* @var string
*/
#[ORM\Column(name:"nom", type:"string", length:255, nullable:true)]
#[Assert\NotBlank()]
private $nom;
/**
* @var string
*/
#[ORM\Column(name:"titol_ca", type:"string", length:255)]
#[Assert\NotBlank()]
private $titol_ca;
/**
* @var string
*/
#[ORM\Column(name:"titol_es", type:"string", length:255)]
#[Assert\NotBlank()]
private $titol_es;
/**
* @var string
*/
#[ORM\Column(name:"titol_en", type:"string", length:255)]
#[Assert\NotBlank()]
private $titol_en;
/**
* @var string
*/
#[ORM\Column(name:"titol_fr", type:"string", length:255)]
#[Assert\NotBlank()]
private $titol_fr;
/**
* @var string
*/
#[ORM\Column(name:"titol_pt", type:"string", length:255, nullable:true)]
private $titol_pt;
/**
* @var string
*/
#[ORM\Column(name:"slug_ca", type:"string", length:255)]
#[Assert\NotBlank()]
private $slug_ca;
/**
* @var string
*/
#[ORM\Column(name:"slug_es", type:"string", length:255)]
#[Assert\NotBlank()]
private $slug_es;
/**
* @var string
*/
#[ORM\Column(name:"slug_en", type:"string", length:255)]
#[Assert\NotBlank()]
private $slug_en;
/**
* @var string
*/
#[ORM\Column(name:"slug_fr", type:"string", length:255)]
#[Assert\NotBlank()]
private $slug_fr;
/**
* @var string
*/
#[ORM\Column(name:"slug_pt", type:"string", length:255, nullable:true)]
private $slug_pt;
/**
* @var string
*/
#[ORM\Column(name:"title_ca", type:"string", length:60, nullable:true)]
private $title_ca;
/**
* @var string
*/
#[ORM\Column(name:"title_es", type:"string", length:60, nullable:true)]
private $title_es;
/**
* @var string
*/
#[ORM\Column(name:"title_en", type:"string", length:60, nullable:true)]
private $title_en;
/**
* @var string
*/
#[ORM\Column(name:"title_fr", type:"string", length:60, nullable:true)]
private $title_fr;
/**
* @var string
*/
#[ORM\Column(name:"title_pt", type:"string", length:60, nullable:true)]
private $title_pt;
/**
* @var string
*/
#[ORM\Column(name:"description_ca", type:"string", length:160, nullable:true)]
private $description_ca;
/**
* @var string
*/
#[ORM\Column(name:"description_es", type:"string", length:160, nullable:true)]
private $description_es;
/**
* @var string
*/
#[ORM\Column(name:"description_en", type:"string", length:160, nullable:true)]
private $description_en;
/**
* @var string
*/
#[ORM\Column(name:"description_fr", type:"string", length:160, nullable:true)]
private $description_fr;
/**
* @var string
*/
#[ORM\Column(name:"description_pt", type:"string", length:160, nullable:true)]
private $description_pt;
/**
* @var string
*/
#[ORM\Column(name:"keywords_ca", type:"string", length:255, nullable:true)]
private $keywords_ca;
/**
* @var string
*/
#[ORM\Column(name:"keywords_es", type:"string", length:255, nullable:true)]
private $keywords_es;
/**
* @var string
*/
#[ORM\Column(name:"keywords_en", type:"string", length:255, nullable:true)]
private $keywords_en;
/**
* @var string
*/
#[ORM\Column(name:"keywords_fr", type:"string", length:255, nullable:true)]
private $keywords_fr;
/**
* @var string
*/
#[ORM\Column(name:"keywords_pt", type:"string", length:255, nullable:true)]
private $keywords_pt;
/**
* @var boolean
*/
#[ORM\Column(name:"visible", type:"boolean", nullable:true)]
private $visible;
/**
* @var boolean
*/
#[ORM\Column(name:"visible_menu", type:"boolean", nullable:true)]
private $visibleMenu;
/**
* @var integer
*/
#[ORM\Column(name:"ordre", type:"integer", nullable:true)]
private $ordre;
#[ORM\ManyToOne(targetEntity:"App\Entity\Sidebar")]
private $sidebar;
#[ORM\ManyToOne(targetEntity:"App\Entity\Tema")]
private $tema;
#[ORM\ManyToOne(targetEntity:"App\Entity\Galeries")]
private $galeries;
#[ORM\OneToMany(targetEntity:"Bloc", mappedBy:"pagina", cascade:["persist", "remove"])]
#[OrderBy(["ordre" => "ASC"])]
protected $blocs;
#[ORM\OneToMany(targetEntity:"MenuOpcio", mappedBy:"pagina", cascade:["persist", "remove"])]
#[OrderBy(["ordre" => "ASC"])]
protected $menuOpcions;
public function __construct()
{
$this->blocs = new ArrayCollection();
$this->menuOpcions = new ArrayCollection();
$this->visible = false;
$this->visibleMenu = false;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set nom
*
* @param string $nom El nom intern, només visible en el backend
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
*/
public function getNom()
{
return $this->nom;
}
/**
* Set titol
*
* @param string $titol
* @param string $locale
* @return Pagina
*/
public function setTitol($titol, $locale)
{
$this->{"titol_" . $locale} = $titol;
return $this;
}
/**
* Get titol
*
* @param string $locale
* @return string
*/
public function getTitol($locale = "ca")
{
return $this->{"titol_" . $locale};
}
/**
* Set slug
*
* @param string $slug
* @param string $locale
* @return Pagina
*/
public function setSlug($slug, $locale)
{
$this->{"slug_" . $locale} = $slug;
return $this;
}
/**
* Get slug
*
* @param string $locale
* @return string
*/
public function getSlug($locale = "ca")
{
return $this->{"slug_" . $locale};
}
/**
* Set title
*
* @param string $title
* @param string $locale
* @return Pagina
*/
public function setTitle($title, $locale)
{
$this->{"title_" . $locale} = $title;
return $this;
}
/**
* Get title
*
* @param string $locale
* @return string
*/
public function getTitle($locale = "ca")
{
return $this->{"title_" . $locale};
}
/**
* Set description
*
* @param string $description
* @param string $locale
* @return Pagina
*/
public function setDescription($description, $locale)
{
$this->{"description_" . $locale} = $description;
return $this;
}
/**
* Get description
*
* @param string $locale
* @return string
*/
public function getDescription($locale = "ca")
{
return $this->{"description_" . $locale};
}
/**
* Set keywords
*
* @param string $keywords
* @param string $locale
* @return Pagina
*/
public function setKeywords($keywords, $locale)
{
$this->{"keywords_" . $locale} = $keywords;
return $this;
}
/**
* Get keywords
*
* @param string $locale
* @return string
*/
public function getKeywords($locale = "ca")
{
return $this->{"keywords_" . $locale};
}
/**
* Set visible
*
* @param boolean $visible
* @return Pagina
*/
public function setVisible($visible)
{
$this->visible = $visible;
return $this;
}
/**
* Get visible
*
* @return boolean
*/
public function getVisible()
{
return $this->visible;
}
/**
* Set Sidebar
*
* @param \App\Entity\Sidebar $sidebar
* @return Pagina
*/
public function setSidebar(\App\Entity\Sidebar $sidebar)
{
$this->sidebar = $sidebar;
return $this;
}
/**
* Get sidebar
*
* @return string
*/
public function getSidebar()
{
return $this->sidebar;
}
/**
* Set Tema
*
* @param \App\Entity\Tema $tema
* @return Pagina
*/
public function setTema(\App\Entity\Tema $tema)
{
$this->tema = $tema;
return $this;
}
/**
* Get tema
*
* @return string
*/
public function getTema()
{
return $this->tema;
}
public function getBlocs()
{
return $this->blocs;
}
public function getMenuOpcions()
{
return $this->menuOpcions;
}
public function __toString()
{
return $this->nom;
}
/**
* Set titol_ca
*
* @param string $titolCa
* @return Pagina
*/
public function setTitolCa($titolCa)
{
$this->titol_ca = $titolCa;
return $this;
}
/**
* Get titol_ca
*
* @return string
*/
public function getTitolCa()
{
return $this->titol_ca;
}
/**
* Set titol_es
*
* @param string $titolEs
* @return Pagina
*/
public function setTitolEs($titolEs)
{
$this->titol_es = $titolEs;
return $this;
}
/**
* Get titol_es
*
* @return string
*/
public function getTitolEs()
{
return $this->titol_es;
}
/**
* Set titol_en
*
* @param string $titolEn
* @return Pagina
*/
public function setTitolEn($titolEn)
{
$this->titol_en = $titolEn;
return $this;
}
/**
* Get titol_en
*
* @return string
*/
public function getTitolEn()
{
return $this->titol_en;
}
/**
* Set titol_fr
*
* @param string $titolFr
* @return Pagina
*/
public function setTitolFr($titolFr)
{
$this->titol_fr = $titolFr;
return $this;
}
/**
* Get titol_fr
*
* @return string
*/
public function getTitolFr()
{
return $this->titol_fr;
}
/**
* Set titol_pt
*
* @param string $titolPt
* @return Pagina
*/
public function setTitolPt($titolPt)
{
$this->titol_pt = $titolPt;
return $this;
}
/**
* Get titol_pt
*
* @return string
*/
public function getTitolPt()
{
return $this->titol_pt;
}
/**
* Set slug_ca
*
* @param string $slugCa
* @return Pagina
*/
public function setSlugCa($slugCa)
{
$this->slug_ca = $slugCa;
return $this;
}
/**
* Get slug_ca
*
* @return string
*/
public function getSlugCa()
{
return $this->slug_ca;
}
/**
* Set slug_es
*
* @param string $slugEs
* @return Pagina
*/
public function setSlugEs($slugEs)
{
$this->slug_es = $slugEs;
return $this;
}
/**
* Get slug_es
*
* @return string
*/
public function getSlugEs()
{
return $this->slug_es;
}
/**
* Set slug_en
*
* @param string $slugEn
* @return Pagina
*/
public function setSlugEn($slugEn)
{
$this->slug_en = $slugEn;
return $this;
}
/**
* Get slug_en
*
* @return string
*/
public function getSlugEn()
{
return $this->slug_en;
}
/**
* Set slug_fr
*
* @param string $slugFr
* @return Pagina
*/
public function setSlugFr($slugFr)
{
$this->slug_fr = $slugFr;
return $this;
}
/**
* Get slug_fr
*
* @return string
*/
public function getSlugFr()
{
return $this->slug_fr;
}
/**
* Set slug_pt
*
* @param string $slugPt
* @return Pagina
*/
public function setSlugPt($slugPt)
{
$this->slug_pt = $slugPt;
return $this;
}
/**
* Get slug_pt
*
* @return string
*/
public function getSlugPt()
{
return $this->slug_pt;
}
/**
* Set title_ca
*
* @param string $titleCa
* @return Pagina
*/
public function setTitleCa($titleCa)
{
$this->title_ca = $titleCa;
return $this;
}
/**
* Get title_ca
*
* @return string
*/
public function getTitleCa()
{
return $this->title_ca;
}
/**
* Set title_es
*
* @param string $titleEs
* @return Pagina
*/
public function setTitleEs($titleEs)
{
$this->title_es = $titleEs;
return $this;
}
/**
* Get title_es
*
* @return string
*/
public function getTitleEs()
{
return $this->title_es;
}
/**
* Set title_en
*
* @param string $titleEn
* @return Pagina
*/
public function setTitleEn($titleEn)
{
$this->title_en = $titleEn;
return $this;
}
/**
* Get title_en
*
* @return string
*/
public function getTitleEn()
{
return $this->title_en;
}
/**
* Set title_fr
*
* @param string $titleFr
* @return Pagina
*/
public function setTitleFr($titleFr)
{
$this->title_fr = $titleFr;
return $this;
}
/**
* Get title_fr
*
* @return string
*/
public function getTitleFr()
{
return $this->title_fr;
}
/**
* Set title_pt
*
* @param string $titlePt
* @return Pagina
*/
public function setTitlePt($titlePt)
{
$this->title_pt = $titlePt;
return $this;
}
/**
* Get title_pt
*
* @return string
*/
public function getTitlePt()
{
return $this->title_pt;
}
/**
* Set description_ca
*
* @param string $descriptionCa
* @return Pagina
*/
public function setDescriptionCa($descriptionCa)
{
$this->description_ca = $descriptionCa;
return $this;
}
/**
* Get description_ca
*
* @return string
*/
public function getDescriptionCa()
{
return $this->description_ca;
}
/**
* Set description_es
*
* @param string $descriptionEs
* @return Pagina
*/
public function setDescriptionEs($descriptionEs)
{
$this->description_es = $descriptionEs;
return $this;
}
/**
* Get description_es
*
* @return string
*/
public function getDescriptionEs()
{
return $this->description_es;
}
/**
* Set description_en
*
* @param string $descriptionEn
* @return Pagina
*/
public function setDescriptionEn($descriptionEn)
{
$this->description_en = $descriptionEn;
return $this;
}
/**
* Get description_en
*
* @return string
*/
public function getDescriptionEn()
{
return $this->description_en;
}
/**
* Set description_fr
*
* @param string $descriptionFr
* @return Pagina
*/
public function setDescriptionFr($descriptionFr)
{
$this->description_fr = $descriptionFr;
return $this;
}
/**
* Get description_fr
*
* @return string
*/
public function getDescriptionFr()
{
return $this->description_fr;
}
/**
* Set description_pt
*
* @param string $descriptionPt
* @return Pagina
*/
public function setDescriptionPt($descriptionPt)
{
$this->description_pt = $descriptionPt;
return $this;
}
/**
* Get description_pt
*
* @return string
*/
public function getDescriptionPt()
{
return $this->description_pt;
}
/**
* Set keywords_ca
*
* @param string $keywordsCa
* @return Pagina
*/
public function setKeywordsCa($keywordsCa)
{
$this->keywords_ca = $keywordsCa;
return $this;
}
/**
* Get keywords_ca
*
* @return string
*/
public function getKeywordsCa()
{
return $this->keywords_ca;
}
/**
* Set keywords_es
*
* @param string $keywordsEs
* @return Pagina
*/
public function setKeywordsEs($keywordsEs)
{
$this->keywords_es = $keywordsEs;
return $this;
}
/**
* Get keywords_es
*
* @return string
*/
public function getKeywordsEs()
{
return $this->keywords_es;
}
/**
* Set keywords_en
*
* @param string $keywordsEn
* @return Pagina
*/
public function setKeywordsEn($keywordsEn)
{
$this->keywords_en = $keywordsEn;
return $this;
}
/**
* Get keywords_en
*
* @return string
*/
public function getKeywordsEn()
{
return $this->keywords_en;
}
/**
* Set keywords_fr
*
* @param string $keywordsFr
* @return Pagina
*/
public function setKeywordsFr($keywordsFr)
{
$this->keywords_fr = $keywordsFr;
return $this;
}
/**
* Get keywords_fr
*
* @return string
*/
public function getKeywordsFr()
{
return $this->keywords_fr;
}
/**
* Set keywords_pt
*
* @param string $keywordsPt
* @return Pagina
*/
public function setKeywordsPt($keywordsPt)
{
$this->keywords_pt = $keywordsPt;
return $this;
}
/**
* Get keywords_pt
*
* @return string
*/
public function getKeywordsPt()
{
return $this->keywords_pt;
}
/**
* Add blocs
*
* @param \App\Entity\Bloc $blocs
* @return Pagina
*/
public function addBloc(\App\Entity\Bloc $blocs)
{
$this->blocs[] = $blocs;
return $this;
}
/**
* Remove blocs
*
* @param \App\Entity\Bloc $blocs
*/
public function removeBloc(\App\Entity\Bloc $blocs)
{
$this->blocs->removeElement($blocs);
}
/**
* Add menuOpcions
*
* @param \App\Entity\MenuOpcio $menuOpcions
* @return Pagina
*/
public function addMenuOpcion(\App\Entity\MenuOpcio $menuOpcions)
{
$this->menuOpcions[] = $menuOpcions;
return $this;
}
/**
* Remove menuOpcions
*
* @param \App\Entity\MenuOpcio $menuOpcions
*/
public function removeMenuOpcion(\App\Entity\MenuOpcio $menuOpcions)
{
$this->menuOpcions->removeElement($menuOpcions);
}
/**
* Set visibleMenu
*
* @param boolean $visibleMenu
* @return Pagina
*/
public function setVisibleMenu($visibleMenu)
{
$this->visibleMenu = $visibleMenu;
return $this;
}
/**
* Get visibleMenu
*
* @return boolean
*/
public function getVisibleMenu()
{
return $this->visibleMenu;
}
/**
* Set ordre
*
* @param integer $ordre
* @return Pagina
*/
public function setOrdre($ordre)
{
$this->ordre = $ordre;
return $this;
}
/**
* Get ordre
*
* @return integer
*/
public function getOrdre()
{
return $this->ordre;
}
/**
* Set galeries
*
* @param \App\Entity\Galeries $galeries
* @return Pagina
*/
public function setGaleries(\App\Entity\Galeries $galeries = null)
{
$this->galeries = $galeries;
return $this;
}
/**
* Get galeries
*
* @return \App\Entity\Galeries
*/
public function getGaleries()
{
return $this->galeries;
}
}