classes/XLite/Model/Payment/MethodSetting.php line 22

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\Payment;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Something customer can put into his cart
  10.  *
  11.  * @ORM\Entity
  12.  * @ORM\Table (name="payment_method_settings",
  13.  *      uniqueConstraints={
  14.  *          @ORM\UniqueConstraint (name="mn", columns={"method_id","name"})
  15.  *      }
  16.  * )
  17.  */
  18. class MethodSetting extends \XLite\Model\AEntity
  19. {
  20.     /**
  21.      * Primary key
  22.      *
  23.      * @var integer
  24.      *
  25.      * @ORM\Id
  26.      * @ORM\GeneratedValue (strategy="AUTO")
  27.      * @ORM\Column         (type="integer")
  28.      */
  29.     protected $setting_id;
  30.     /**
  31.      * Setting name
  32.      *
  33.      * @var string
  34.      *
  35.      * @ORM\Column (type="string", length=128)
  36.      */
  37.     protected $name;
  38.     /**
  39.      * Value
  40.      *
  41.      * @var string
  42.      *
  43.      * @ORM\Column (type="text")
  44.      */
  45.     protected $value '';
  46.     /**
  47.      * Payment method
  48.      *
  49.      * @var \XLite\Model\Payment\Method
  50.      *
  51.      * @ORM\ManyToOne  (targetEntity="XLite\Model\Payment\Method", inversedBy="settings")
  52.      * @ORM\JoinColumn (name="method_id", referencedColumnName="method_id", onDelete="CASCADE")
  53.      */
  54.     protected $payment_method;
  55.     /**
  56.      * Get setting_id
  57.      *
  58.      * @return integer
  59.      */
  60.     public function getSettingId()
  61.     {
  62.         return $this->setting_id;
  63.     }
  64.     /**
  65.      * Set name
  66.      *
  67.      * @param string $name
  68.      * @return MethodSetting
  69.      */
  70.     public function setName($name)
  71.     {
  72.         $this->name $name;
  73.         return $this;
  74.     }
  75.     /**
  76.      * Get name
  77.      *
  78.      * @return string
  79.      */
  80.     public function getName()
  81.     {
  82.         return $this->name;
  83.     }
  84.     /**
  85.      * Set value
  86.      *
  87.      * @param string $value
  88.      * @return MethodSetting
  89.      */
  90.     public function setValue($value)
  91.     {
  92.         $this->value $value;
  93.         return $this;
  94.     }
  95.     /**
  96.      * Get value
  97.      *
  98.      * @return string
  99.      */
  100.     public function getValue()
  101.     {
  102.         return $this->value;
  103.     }
  104.     /**
  105.      * Set payment_method
  106.      *
  107.      * @param \XLite\Model\Payment\Method $paymentMethod
  108.      * @return MethodSetting
  109.      */
  110.     public function setPaymentMethod(\XLite\Model\Payment\Method $paymentMethod null)
  111.     {
  112.         $this->payment_method $paymentMethod;
  113.         return $this;
  114.     }
  115.     /**
  116.      * Get payment_method
  117.      *
  118.      * @return \XLite\Model\Payment\Method
  119.      */
  120.     public function getPaymentMethod()
  121.     {
  122.         return $this->payment_method;
  123.     }
  124. }