classes/XLite/Model/AttributeTranslation.php line 24

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. namespace XLite\Model;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Attribute multilingual data
  10.  *
  11.  * @ORM\Entity
  12.  *
  13.  * @ORM\Table (name="attribute_translations",
  14.  *         indexes={
  15.  *              @ORM\Index (name="ci", columns={"code","id"}),
  16.  *              @ORM\Index (name="id", columns={"id"})
  17.  *         }
  18.  * )
  19.  */
  20. class AttributeTranslation extends \XLite\Model\Base\Translation
  21. {
  22.     /**
  23.      * Name
  24.      *
  25.      * @var string
  26.      *
  27.      * @ORM\Column (type="string", length=255)
  28.      */
  29.     protected $name;
  30.     /**
  31.      * Unit
  32.      *
  33.      * @var   string
  34.      * @see   ____var_see____
  35.      * @since 1.0.0
  36.      *
  37.      * @ORM\Column (type="string", length=255)
  38.      */
  39.     protected $unit '';
  40.     /**
  41.      * @var \XLite\Model\Attribute
  42.      *
  43.      * @ORM\ManyToOne (targetEntity="XLite\Model\Attribute", inversedBy="translations")
  44.      * @ORM\JoinColumn (name="id", referencedColumnName="id", onDelete="CASCADE")
  45.      */
  46.     protected $owner;
  47.     /**
  48.      * Set name
  49.      *
  50.      * @param string $name
  51.      * @return AttributeTranslation
  52.      */
  53.     public function setName($name)
  54.     {
  55.         $this->name $name;
  56.         return $this;
  57.     }
  58.     /**
  59.      * Get name
  60.      *
  61.      * @return string
  62.      */
  63.     public function getName()
  64.     {
  65.         return $this->name;
  66.     }
  67.     /**
  68.      * Set unit
  69.      *
  70.      * @param string $unit
  71.      * @return AttributeTranslation
  72.      */
  73.     public function setUnit($unit)
  74.     {
  75.         $this->unit $unit;
  76.         return $this;
  77.     }
  78.     /**
  79.      * Get unit
  80.      *
  81.      * @return string
  82.      */
  83.     public function getUnit()
  84.     {
  85.         return $this->unit;
  86.     }
  87.     /**
  88.      * Get label_id
  89.      *
  90.      * @return integer
  91.      */
  92.     public function getLabelId()
  93.     {
  94.         return $this->label_id;
  95.     }
  96.     /**
  97.      * Set code
  98.      *
  99.      * @param string $code
  100.      * @return AttributeTranslation
  101.      */
  102.     public function setCode($code)
  103.     {
  104.         $this->code $code;
  105.         return $this;
  106.     }
  107.     /**
  108.      * Get code
  109.      *
  110.      * @return string
  111.      */
  112.     public function getCode()
  113.     {
  114.         return $this->code;
  115.     }
  116. }