classes/XLite/Model/CountryTranslation.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.  * Country translations
  10.  *
  11.  * @ORM\Entity
  12.  * @ORM\Table (name="country_translations",
  13.  *      indexes={
  14.  *          @ORM\Index (name="ci", columns={"code","id"}),
  15.  *          @ORM\Index (name="country", columns={"country"}),
  16.  *          @ORM\Index (name="id", columns={"id"})
  17.  *      }
  18.  * )
  19.  */
  20. class CountryTranslation extends \XLite\Model\Base\Translation
  21. {
  22.     /**
  23.      * Country name
  24.      *
  25.      * @var string
  26.      *
  27.      * @ORM\Column (type="string", length=64)
  28.      */
  29.     protected $country;
  30.     /**
  31.      * @var \XLite\Model\Country
  32.      *
  33.      * @ORM\ManyToOne (targetEntity="XLite\Model\Country", inversedBy="translations")
  34.      * @ORM\JoinColumn (name="id", referencedColumnName="code", onDelete="CASCADE")
  35.      */
  36.     protected $owner;
  37.     /**
  38.      * Set country
  39.      *
  40.      * @param string $country
  41.      * @return CountryTranslation
  42.      */
  43.     public function setCountry($country)
  44.     {
  45.         $this->country $country;
  46.         return $this;
  47.     }
  48.     /**
  49.      * Get country
  50.      *
  51.      * @return string
  52.      */
  53.     public function getCountry()
  54.     {
  55.         return $this->country;
  56.     }
  57.     /**
  58.      * Get label_id
  59.      *
  60.      * @return integer
  61.      */
  62.     public function getLabelId()
  63.     {
  64.         return $this->label_id;
  65.     }
  66.     /**
  67.      * Set code
  68.      *
  69.      * @param string $code
  70.      * @return CountryTranslation
  71.      */
  72.     public function setCode($code)
  73.     {
  74.         $this->code $code;
  75.         return $this;
  76.     }
  77.     /**
  78.      * Get code
  79.      *
  80.      * @return string
  81.      */
  82.     public function getCode()
  83.     {
  84.         return $this->code;
  85.     }
  86. }