<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
class InfoSectionCategory {
/**
* @var int
*/
private $id;
/**
* @var string
*/
private $heading;
/**
* @var string
*/
private $description;
/**
* @var string
*/
private $link;
/**
* @var int
*/
private $target;
/**
* @var int
*/
private $position;
/**
* @var \App\Entity\InfoSectionType
*/
private $sectionType;
/**
* @var \App\Entity\Media
*/
private $categoryPicture;
/**
* @var \Doctrine\Common\Collections\Collection
*/
private $subCategories;
/**
* @var string
*/
private $urlText;
/**
* Constructor
*/
public function __construct()
{
$this->subCategories = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id.
*
* @return int
*/
public function getId() {
return $this->id;
}
/**
* Set heading.
*
* @param string $heading
*
* @return InfoSectionCategory
*/
public function setHeading($heading) {
$this->heading = $heading;
return $this;
}
/**
* Get heading.
*
* @return string
*/
public function getHeading() {
return $this->heading;
}
/**
* Set description.
*
* @param string $description
*
* @return InfoSectionCategory
*/
public function setDescription($description) {
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription() {
return $this->description;
}
/**
* Set target.
*
* @param int $target
*
* @return InfoSectionCategory
*/
public function setTarget($target) {
$this->target = $target;
return $this;
}
/**
* Get target.
*
* @return int
*/
public function getTarget() {
return $this->target;
}
public function getTargetText() {
if (empty($this->target) || $this->target == 0) {
return "_self";
}
if ($this->target == 1) {
return "_self";
}
return "_blank";
}
/**
* Set position.
*
* @param int $position
*
* @return InfoSectionCategory
*/
public function setPosition($position) {
$this->position = $position;
return $this;
}
/**
* Get position.
*
* @return int
*/
public function getPosition() {
return $this->position;
}
/**
* Set sectionType.
*
* @param \App\Entity\InfoSectionType|null $sectionType
*
* @return InfoSectionCategory
*/
public function setSectionType(\App\Entity\InfoSectionType $sectionType = null) {
$this->sectionType = $sectionType;
return $this;
}
/**
* Get sectionType.
*
* @return \App\Entity\InfoSectionType|null
*/
public function getSectionType() {
return $this->sectionType;
}
/**
* Set categoryPicture.
*
* @param \App\Entity\Media|null $categoryPicture
*
* @return InfoSectionCategory
*/
public function setCategoryPicture(\App\Entity\Media $categoryPicture = null) {
$this->categoryPicture = $categoryPicture;
return $this;
}
/**
* Get categoryPicture.
*
* @return \App\Entity\Media|null
*/
public function getCategoryPicture() {
return $this->categoryPicture;
}
/**
* Set link.
*
* @param string $link
*
* @return InfoSectionCategory
*/
public function setLink($link) {
$this->link = $link;
return $this;
}
/**
* Get link.
*
* @return string
*/
public function getLink() {
return $this->link;
}
/**
* Add subCategory.
*
* @param \App\Entity\InfoSectionSubCategory $subCategory
*
* @return InfoSectionCategory
*/
public function addSubCategory(\App\Entity\InfoSectionSubCategory $subCategory)
{
$this->subCategories[] = $subCategory;
return $this;
}
/**
* Remove subCategory.
*
* @param \App\Entity\InfoSectionSubCategory $subCategory
*
* @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
*/
public function removeSubCategory(\App\Entity\InfoSectionSubCategory $subCategory)
{
return $this->subCategories->removeElement($subCategory);
}
/**
* Get subCategories.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSubCategories()
{
return $this->subCategories;
}
public function getUrlText() {
return $this->urlText;
}
public function setUrlText($urlText) {
$this->urlText = $urlText;
}
public function __toString() {
return $this->heading;
}
}