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/src/CourseBundle/Entity/CShortcut.php

66 lines
1.3 KiB

<?php
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Entity;
use APY\DataGridBundle\Grid\Mapping as GRID;
use Chamilo\CoreBundle\Entity\Resource\AbstractResource;
use Chamilo\CoreBundle\Entity\Resource\ResourceInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table(name="c_shortcut")
* @ORM\Entity
* @GRID\Source(columns="id, name, resourceNode.createdAt", filterable=false, groups={"resource"})
*/
class CShortcut extends AbstractResource implements ResourceInterface
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
protected $id;
/**
* @Assert\NotBlank
*
* @ORM\Column(name="name", type="string", length=255, nullable=false)
*/
protected $name;
public function __toString(): string
{
return $this->getName();
}
public function getName(): string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* Resource identifier.
*/
public function getResourceIdentifier(): int
{
return $this->id;
}
public function getResourceName(): string
{
return $this->getName();
}
}