142 lines
2.1 KiB
PHP
142 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace Skobkin\Bundle\CopyPasteBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
/**
|
|
* Language
|
|
*
|
|
* @ORM\Table(
|
|
* name="languages",
|
|
* indexes={
|
|
* @ORM\Index(name="idx_enabled", columns={"enabled"}),
|
|
* @ORM\Index(name="idx_code", columns={"code"})
|
|
* }
|
|
* )
|
|
* @ORM\Entity
|
|
*/
|
|
class Language
|
|
{
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="IDENTITY")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="name", type="string", length=100, nullable=false)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @var string
|
|
*
|
|
* @ORM\Column(name="code", type="string", length=24, nullable=false)
|
|
*/
|
|
private $code;
|
|
|
|
/**
|
|
* @var boolean
|
|
*
|
|
* @ORM\Column(name="enabled", type="boolean", nullable=false)
|
|
*/
|
|
private $enabled;
|
|
|
|
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set name
|
|
*
|
|
* @param string $name
|
|
* @return Lang
|
|
*/
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Set code
|
|
*
|
|
* @param string $file
|
|
* @return Lang
|
|
*/
|
|
public function setCode($code)
|
|
{
|
|
$this->code = $code;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get code
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCode()
|
|
{
|
|
return $this->code;
|
|
}
|
|
|
|
/**
|
|
* Set enabled
|
|
*
|
|
* @param boolean $enabled
|
|
* @return Lang
|
|
*/
|
|
public function setEnabled($enabled)
|
|
{
|
|
$this->enabled = $enabled;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get enabled
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function getEnabled()
|
|
{
|
|
return $this->enabled;
|
|
}
|
|
|
|
/**
|
|
* Check if language is enabled
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function isEnabled()
|
|
{
|
|
return $this->enabled;
|
|
}
|
|
}
|