modules/QSL/Banner/src/Model/BannerSlideTranslation.php line 21

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\Banner\Model;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity
  10.  * @ORM\Table  (name="banner_slide_translations",
  11.  *    indexes={
  12.  *      @ORM\Index (name="ci", columns={"code","id"}),
  13.  *      @ORM\Index (name="id", columns={"id"})
  14.  *   }
  15.  * )
  16.  */
  17. class BannerSlideTranslation extends \XLite\Model\Base\Translation
  18. {
  19.     /**
  20.      * @var string
  21.      *
  22.      * @ORM\Column (type="string")
  23.      */
  24.     protected $maintext '';
  25.     /**
  26.      * @var string
  27.      *
  28.      * @ORM\Column (type="string")
  29.      */
  30.     protected $addtext '';
  31.     /**
  32.      * @var string
  33.      *
  34.      * @ORM\Column (type="string", nullable=true)
  35.      */
  36.     protected $actionButton 'Find out more';
  37.     /**
  38.      * @var \QSL\Banner\Model\BannerSlide
  39.      *
  40.      * @ORM\ManyToOne (targetEntity="QSL\Banner\Model\BannerSlide", inversedBy="translations")
  41.      * @ORM\JoinColumn (name="id", referencedColumnName="id", onDelete="CASCADE")
  42.      */
  43.     protected $owner;
  44.     public function __construct(array $data = [])
  45.     {
  46.         $this->setActionButton(
  47.             static::t($this->getActionButton())
  48.         );
  49.         parent::__construct($data);
  50.     }
  51.     /**
  52.      * @param $maintext
  53.      */
  54.     public function setMaintext($maintext)
  55.     {
  56.         $this->maintext $maintext;
  57.     }
  58.     /**
  59.      * @return string
  60.      */
  61.     public function getMaintext()
  62.     {
  63.         return $this->maintext;
  64.     }
  65.     /**
  66.      * @param $maintext
  67.      */
  68.     public function setAddtext($addtext)
  69.     {
  70.         $this->addtext $addtext;
  71.     }
  72.     /**
  73.      * @return string
  74.      */
  75.     public function getAddtext()
  76.     {
  77.         return $this->addtext;
  78.     }
  79.     /**
  80.      * @param $actionButton
  81.      */
  82.     public function setActionButton($actionButton)
  83.     {
  84.         $this->actionButton $actionButton;
  85.     }
  86.     /**
  87.      * @return string
  88.      */
  89.     public function getActionButton()
  90.     {
  91.         return $this->actionButton;
  92.     }
  93. }