Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/inc/Entity/CurriculumCategory.php

426 lines
7.4 KiB

<?php
namespace Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\ArrayCollection;
/**
* CurriculumCategory
*
* @Gedmo\Tree(type="nested")
* @ORM\Table(name="curriculum_category")
* @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository")
*/
class CurriculumCategory
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var integer
*
* @ORM\Column(name="c_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $cId;
/**
* @var integer
*
* @ORM\Column(name="session_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $sessionId;
/**
* @var string
*
* @ORM\Column(name="title", type="string", length=255, precision=0, scale=0, nullable=true, unique=false)
*/
private $title;
/**
* @var integer
*
* @ORM\Column(name="max_score", type="integer", precision=0, scale=0, nullable=false, unique=false)
*/
private $maxScore;
/**
* @var boolean
*
* @ORM\Column(name="min_chars", type="boolean", precision=0, scale=0, nullable=false, unique=false)
*/
private $minChars;
/**
* @Gedmo\TreeParent
* @ORM\ManyToOne(targetEntity="CurriculumCategory", inversedBy="children")
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $parent;
/**
* @var integer
*
* @ORM\Column(name="parent_id", type="integer", precision=0, scale=0, nullable=true, unique=false)
*/
private $parentId;
/**
* @Gedmo\TreeLevel
* @ORM\Column(name="lvl", type="integer")
*/
private $lvl;
/**
* @Gedmo\TreeLeft
* @ORM\Column(name="lft", type="integer")
*/
private $lft;
/**
* @Gedmo\TreeRight
* @ORM\Column(name="rgt", type="integer")
*/
private $rgt;
/**
* @Gedmo\TreeRoot
* @ORM\Column(name="root", type="integer", nullable=true)
*/
private $root;
/**
* @ORM\OneToMany(targetEntity="CurriculumCategory", mappedBy="parent")
* @ORM\OrderBy({"lft" = "ASC"})
*/
private $children;
/**
* @ORM\OneToMany(targetEntity="CurriculumItem", mappedBy="category")
* @ORM\OrderBy({"title" = "ASC"})
*/
private $items;
/**
* @ORM\ManyToOne(targetEntity="Course")
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
*/
private $course;
/**
* @ORM\ManyToOne(targetEntity="Session")
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
*/
private $session;
public function __construct()
{
$this->items = new ArrayCollection();
}
/**
* @return mixed
*/
public function getSession()
{
return $this->session;
}
/**
* @param Session $session
* @return mixed
*/
public function setSession(Session $session)
{
$this->session = $session;
}
/**
* @return mixed
*/
public function getCourse()
{
return $this->course;
}
/**
* @param Course $course
* @return mixed
*/
public function setCourse(Course $course)
{
$this->course = $course;
}
/**
* @return ArrayCollection
*/
public function getItems()
{
return $this->items;
}
/**
* @param CurriculumCategory $parent
*/
public function setParent(CurriculumCategory $parent = null)
{
$this->parent = $parent;
}
/**
* @return CurriculumCategory
*/
public function getParent()
{
return $this->parent;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set cId
*
* @param integer $cId
* @return CurriculumCategory
*/
public function setCId($cId)
{
$this->cId = $cId;
return $this;
}
/**
* Get cId
*
* @return integer
*/
public function getCId()
{
return $this->cId;
}
/**
* Set sessionId
*
* @param integer $sessionId
* @return CurriculumCategory
*/
public function setSessionId($sessionId)
{
$this->sessionId = $sessionId;
return $this;
}
/**
* Get sessionId
*
* @return integer
*/
public function getSessionId()
{
return $this->sessionId;
}
/**
* Set title
*
* @param string $title
* @return CurriculumCategory
*/
public function setTitle($title)
{
$this->title = $title;
return $this;
}
/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
/**
* Set maxScore
*
* @param integer $maxScore
* @return CurriculumCategory
*/
public function setMaxScore($maxScore)
{
$this->maxScore = $maxScore;
return $this;
}
/**
* Get maxScore
*
* @return integer
*/
public function getMaxScore()
{
return $this->maxScore;
}
/**
* Set minChars
*
* @param boolean $minChars
* @return CurriculumCategory
*/
public function setMinChars($minChars)
{
$this->minChars = $minChars;
return $this;
}
/**
* Get minChars
*
* @return boolean
*/
public function getMinChars()
{
return $this->minChars;
}
/**
* Set parentId
*
* @param integer $parentId
* @return CurriculumCategory
*/
public function setParentId($parentId)
{
$this->parentId = $parentId;
return $this;
}
/**
* Get parentId
*
* @return integer
*/
public function getParentId()
{
return $this->parentId;
}
/**
* Set lvl
*
* @param integer $lvl
* @return CurriculumCategory
*/
public function setLvl($lvl)
{
$this->lvl = $lvl;
return $this;
}
/**
* Get lvl
*
* @return integer
*/
public function getLvl()
{
return $this->lvl;
}
/**
* Set lft
*
* @param integer $lft
* @return CurriculumCategory
*/
public function setLft($lft)
{
$this->lft = $lft;
return $this;
}
/**
* Get lft
*
* @return integer
*/
public function getLft()
{
return $this->lft;
}
/**
* Set rgt
*
* @param integer $rgt
* @return CurriculumCategory
*/
public function setRgt($rgt)
{
$this->rgt = $rgt;
return $this;
}
/**
* Get rgt
*
* @return integer
*/
public function getRgt()
{
return $this->rgt;
}
/**
* Set root
*
* @param integer $root
* @return CurriculumCategory
*/
public function setRoot($root)
{
$this->root = $root;
return $this;
}
/**
* Get root
*
* @return integer
*/
public function getRoot()
{
return $this->root;
}
}