Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace S4P\MainBundle\Entity;
- use Doctrine\Common\Collections\ArrayCollection;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * Category
- *
- * @ORM\Table()
- * @ORM\Entity(repositoryClass="S4P\MainBundle\Entity\CategoryRepository")
- */
- class Category {
- /**
- * @var integer
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @ORM\Column(name="title", type="string", length=255)
- */
- private $title;
- /**
- * @ORM\Column(name="sub_title", type="string", length=255, nullable=true)
- */
- private $sub_title;
- /**
- * @ORM\Column(name="solution_text", type="string", length=255, nullable=true)
- */
- private $solution_text;
- /**
- * @var string
- *
- * @ORM\Column(name="cat_text", type="text")
- */
- private $cat_text;
- /**
- * @var $entries
- * @ORM\OneToMany(targetEntity="Entry", mappedBy="category")
- */
- private $entries;
- function __construct() {
- $this->entries = new ArrayCollection();
- }
- /**
- * @return mixed
- */
- public function getEntries() {
- return $this->entries;
- }
- public function addEntry(Entry $entry) {
- $entry->setCategory($this);
- $this->entries->add($entry);
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId() {
- return $this->id;
- }
- /**
- * @param $cat_text
- */
- public function setCatText($cat_text) {
- $this->cat_text = $cat_text;
- }
- /**
- * @return cat_text
- */
- public function getCatText() {
- return $this->cat_text;
- }
- /**
- * Remove entries
- *
- * @param \S4P\MainBundle\Entity\Entry $entries
- */
- public function removeEntry(Entry $entries) {
- $this->entries->removeElement($entries);
- }
- /**
- * Set title
- *
- * @param string $title
- * @return Category
- */
- public function setTitle($title) {
- $this->title = $title;
- return $this;
- }
- /**
- * Get title
- *
- * @return string
- */
- public function getTitle() {
- return $this->title;
- }
- /**
- * @param mixed $sub_title
- */
- public function setSubTitle($sub_title) {
- $this->sub_title = $sub_title;
- }
- /**
- * @return mixed
- */
- public function getSubTitle() {
- return $this->sub_title;
- }
- /**
- * @param mixed $solution_text
- */
- public function setSolutionText($solution_text) {
- $this->solution_text = $solution_text;
- }
- /**
- * @return mixed
- */
- public function getSolutionText() {
- return $this->solution_text;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement