modules/QSL/SpecialOffersBase/src/Model/OfferTypeTranslation.php line 25

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 QSL\SpecialOffersBase\Model;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Special offer types multilingual data
  10.  *
  11.  * @ORM\Entity
  12.  *
  13.  * @ORM\Table (name="special_offer_type_translations",
  14.  *         indexes={
  15.  *              @ORM\Index (name="ci", columns={"code","id"}),
  16.  *              @ORM\Index (name="id", columns={"id"}),
  17.  *              @ORM\Index (name="name", columns={"name"})
  18.  *         }
  19.  * )
  20.  */
  21. class OfferTypeTranslation extends \XLite\Model\Base\Translation
  22. {
  23.     /**
  24.      * Administrative name of the offer type.
  25.      *
  26.      * @var string
  27.      * @ORM\Column (type="string", length=255)
  28.      */
  29.     protected $name;
  30.     /**
  31.      * @var \QSL\SpecialOffersBase\Model\OfferType
  32.      *
  33.      * @ORM\ManyToOne (targetEntity="QSL\SpecialOffersBase\Model\OfferType", inversedBy="translations")
  34.      * @ORM\JoinColumn (name="id", referencedColumnName="type_id", onDelete="CASCADE")
  35.      */
  36.     protected $owner;
  37.     /**
  38.      * Sets the administative name for the offer type.
  39.      *
  40.      * @param string $name Administrative name
  41.      *
  42.      * @return OfferTypeTranslation
  43.      */
  44.     public function setName($name)
  45.     {
  46.         $this->name $name;
  47.         return $this;
  48.     }
  49.     /**
  50.      * Returns the administative name of the type.
  51.      *
  52.      * @return string
  53.      */
  54.     public function getName()
  55.     {
  56.         return $this->name;
  57.     }
  58.     /**
  59.      * Returns the identifier of the translation.
  60.      *
  61.      * @return integer
  62.      */
  63.     public function getLabelId()
  64.     {
  65.         return $this->label_id;
  66.     }
  67.     /**
  68.      * Sets the language code for the translation.
  69.      *
  70.      * @param string $code Code
  71.      *
  72.      * @return OfferTypeTranslation
  73.      */
  74.     public function setCode($code)
  75.     {
  76.         $this->code $code;
  77.         return $this;
  78.     }
  79.     /**
  80.      * Returns the language code for the translation.
  81.      *
  82.      * @return string
  83.      */
  84.     public function getCode()
  85.     {
  86.         return $this->code;
  87.     }
  88. }