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.
321 lines
5.4 KiB
321 lines
5.4 KiB
<?php
|
|
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
namespace Chamilo\CoreBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* Class Portfolio.
|
|
*
|
|
* @ORM\Table(
|
|
* name="portfolio",
|
|
* indexes={
|
|
* @ORM\Index(name="user", columns={"user_id"}),
|
|
* @ORM\Index(name="course", columns={"c_id"}),
|
|
* @ORM\Index(name="session", columns={"session_id"}),
|
|
* @ORM\Index(name="category", columns={"category_id"})
|
|
* }
|
|
* )
|
|
* @ORM\Entity()
|
|
*/
|
|
class Portfolio
|
|
{
|
|
/**
|
|
* @var int
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="title", type="text", nullable=false)
|
|
*/
|
|
protected $title;
|
|
|
|
/**
|
|
* @var string
|
|
* @ORM\Column(name="content", type="text")
|
|
*/
|
|
protected $content;
|
|
|
|
/**
|
|
* @var User
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User")
|
|
* @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
|
|
*/
|
|
protected $user;
|
|
|
|
/**
|
|
* @var Course
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course")
|
|
* @ORM\JoinColumn(name="c_id", referencedColumnName="id")
|
|
*/
|
|
protected $course;
|
|
|
|
/**
|
|
* @var Session
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session")
|
|
* @ORM\JoinColumn(name="session_id", referencedColumnName="id")
|
|
*/
|
|
protected $session;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*
|
|
* @ORM\Column(name="creation_date", type="datetime")
|
|
*/
|
|
protected $creationDate;
|
|
|
|
/**
|
|
* @var \DateTime
|
|
*
|
|
* @ORM\Column(name="update_date", type="datetime")
|
|
*/
|
|
protected $updateDate;
|
|
|
|
/**
|
|
* @var bool
|
|
*
|
|
* @ORM\Column(name="is_visible", type="boolean", options={"default": true})
|
|
*/
|
|
protected $isVisible = true;
|
|
|
|
/**
|
|
* @var \Chamilo\CoreBundle\Entity\PortfolioCategory
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\PortfolioCategory", inversedBy="items")
|
|
* @ORM\JoinColumn(name="category_id", referencedColumnName="id")
|
|
*/
|
|
protected $category;
|
|
|
|
/**
|
|
* Portfolio constructor.
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->category = new PortfolioCategory();
|
|
}
|
|
|
|
/**
|
|
* Set user.
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setUser(User $user)
|
|
{
|
|
$this->user = $user;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get user.
|
|
*
|
|
* @return User
|
|
*/
|
|
public function getUser()
|
|
{
|
|
return $this->user;
|
|
}
|
|
|
|
/**
|
|
* Set course.
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setCourse(Course $course = null)
|
|
{
|
|
$this->course = $course;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get course.
|
|
*
|
|
* @return Course
|
|
*/
|
|
public function getCourse()
|
|
{
|
|
return $this->course;
|
|
}
|
|
|
|
/**
|
|
* Get session.
|
|
*
|
|
* @return Session
|
|
*/
|
|
public function getSession()
|
|
{
|
|
return $this->session;
|
|
}
|
|
|
|
/**
|
|
* Set session.
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setSession(Session $session = null)
|
|
{
|
|
$this->session = $session;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set title.
|
|
*
|
|
* @param string $title
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setTitle($title)
|
|
{
|
|
$this->title = $title;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get title.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getTitle()
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
/**
|
|
* Set content.
|
|
*
|
|
* @param string $content
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setContent($content)
|
|
{
|
|
$this->content = $content;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get content.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getContent()
|
|
{
|
|
return $this->content;
|
|
}
|
|
|
|
/**
|
|
* Set creationDate.
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setCreationDate(\DateTime $creationDate)
|
|
{
|
|
$this->creationDate = $creationDate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get creationDate.
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getCreationDate()
|
|
{
|
|
return $this->creationDate;
|
|
}
|
|
|
|
/**
|
|
* Set updateDate.
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setUpdateDate(\DateTime $updateDate)
|
|
{
|
|
$this->updateDate = $updateDate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get updateDate.
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getUpdateDate()
|
|
{
|
|
return $this->updateDate;
|
|
}
|
|
|
|
/**
|
|
* Get id.
|
|
*
|
|
* @return int
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set isVisible.
|
|
*
|
|
* @param bool $isVisible
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setIsVisible($isVisible)
|
|
{
|
|
$this->isVisible = $isVisible;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get isVisible.
|
|
*
|
|
* @return bool
|
|
*/
|
|
public function isVisible()
|
|
{
|
|
return $this->isVisible;
|
|
}
|
|
|
|
/**
|
|
* Get category.
|
|
*
|
|
* @return PortfolioCategory
|
|
*/
|
|
public function getCategory()
|
|
{
|
|
return $this->category;
|
|
}
|
|
|
|
/**
|
|
* Set category.
|
|
*
|
|
* @return Portfolio
|
|
*/
|
|
public function setCategory(PortfolioCategory $category = null)
|
|
{
|
|
$this->category = $category;
|
|
|
|
return $this;
|
|
}
|
|
}
|
|
|