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.
139 lines
2.2 KiB
139 lines
2.2 KiB
<?php
|
|
|
|
/* For licensing terms, see /license.txt */
|
|
|
|
namespace Chamilo\CoreBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Gedmo\Mapping\Annotation as Gedmo;
|
|
|
|
/**
|
|
* Level.
|
|
*
|
|
* @ORM\Table(name="skill_level")
|
|
* @ORM\Entity
|
|
*/
|
|
class Level
|
|
{
|
|
/**
|
|
* @var int
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
*/
|
|
protected $id;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="name", type="string", length=255, nullable=false)
|
|
*/
|
|
protected $name;
|
|
|
|
/**
|
|
* @Gedmo\SortablePosition
|
|
*
|
|
* @ORM\Column(name="position", type="integer")
|
|
*/
|
|
protected $position;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="short_name", type="string", length=255, nullable=false)
|
|
*/
|
|
protected $shortName;
|
|
|
|
/**
|
|
* @Gedmo\SortableGroup
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Profile", inversedBy="levels")
|
|
* @ORM\JoinColumn(name="profile_id", referencedColumnName="id")
|
|
*/
|
|
protected $profile;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function __toString()
|
|
{
|
|
return (string) $this->getName();
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* @param string $name
|
|
*
|
|
* @return Level
|
|
*/
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPosition()
|
|
{
|
|
return $this->position;
|
|
}
|
|
|
|
/**
|
|
* @return Level
|
|
*/
|
|
public function setPosition($position)
|
|
{
|
|
$this->position = $position;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getShortName()
|
|
{
|
|
return $this->shortName;
|
|
}
|
|
|
|
/**
|
|
* @return Level
|
|
*/
|
|
public function setShortName($shortName)
|
|
{
|
|
$this->shortName = $shortName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Profile
|
|
*/
|
|
public function getProfile()
|
|
{
|
|
return $this->profile;
|
|
}
|
|
|
|
/**
|
|
* @return Level
|
|
*/
|
|
public function setProfile($profile)
|
|
{
|
|
$this->profile = $profile;
|
|
|
|
return $this;
|
|
}
|
|
}
|
|
|