src/Entity/Currency.php line 23

Open in your IDE?
  1. <?php
  2. /**
  3.  * Waluta
  4.  */
  5. namespace App\Entity;
  6. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  7. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  8. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  9. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  10. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  11. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  12. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  13. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  14. /**
  15.  * @Doctrine\ORM\Mapping\Entity
  16.  * @Doctrine\ORM\Mapping\Table(name="currency")
  17.  */
  18. class Currency implements TranslatableInterfaceBlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  19.     use BlameableTrait;
  20.     use TimestampableTrait;
  21.     use TranslatableTrait;
  22.     use SoftDeletableTrait;
  23.     
  24.     
  25.     
  26.     /**
  27.      * @Doctrine\ORM\Mapping\Id
  28.      * @Doctrine\ORM\Mapping\Column(type="integer")
  29.      * @Doctrine\ORM\Mapping\GeneratedValue(strategy="AUTO")
  30.      */
  31.     protected $id;
  32.     /**
  33.      * @Doctrine\ORM\Mapping\Column(type="text", length=255)
  34.      */
  35.     protected $sign;
  36.     /**
  37.      * @Doctrine\ORM\Mapping\Column(name="currency_separator", type="text", length=255)
  38.      */
  39.     protected $separator;
  40.     /**
  41.      * @Doctrine\ORM\Mapping\Column(name="position_price", type="text", length=255)
  42.      */
  43.     protected $position;
  44.     /**
  45.      * Domyślny
  46.      * @Doctrine\ORM\Mapping\Column(type="boolean", options={"default"=0})
  47.      */
  48.     protected $isDefault;
  49.     /**
  50.      * Czy aktywny
  51.      * @Doctrine\ORM\Mapping\Column(type="boolean", options={"default"=0})
  52.      */
  53.     protected $isActive;
  54.     /**
  55.      * @Doctrine\ORM\Mapping\Column(name="factorPln", nullable=true, type="float")
  56.      */
  57.     protected $factorPln;
  58.     /**
  59.      * @Doctrine\ORM\Mapping\Column(name="iso_code", nullable=true, type="string")
  60.      */
  61.     protected $isoCode;
  62.     public function __toString()
  63.     {
  64.         return $this->getSign();
  65.     }
  66.     /**
  67.      * Get id
  68.      *
  69.      * @return integer
  70.      */
  71.     public function getId()
  72.     {
  73.         return $this->id;
  74.     }
  75.     /**
  76.      * Set sign
  77.      *
  78.      * @param string $sign
  79.      *
  80.      * @return Currency
  81.      */
  82.     public function setSign($sign)
  83.     {
  84.         $this->sign $sign;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get sign
  89.      *
  90.      * @return string
  91.      */
  92.     public function getSign()
  93.     {
  94.         return $this->sign;
  95.     }
  96.     /**
  97.      * Set isDefault
  98.      *
  99.      * @param boolean $isDefault
  100.      *
  101.      * @return Currency
  102.      */
  103.     public function setIsDefault($isDefault)
  104.     {
  105.         $this->isDefault $isDefault;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get isDefault
  110.      *
  111.      * @return boolean
  112.      */
  113.     public function getIsDefault()
  114.     {
  115.         return $this->isDefault;
  116.     }
  117.     /**
  118.      * Set isActive
  119.      *
  120.      * @param boolean $isActive
  121.      *
  122.      * @return Currency
  123.      */
  124.     public function setIsActive($isActive)
  125.     {
  126.         $this->isActive $isActive;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get isActive
  131.      *
  132.      * @return boolean
  133.      */
  134.     public function getIsActive()
  135.     {
  136.         return $this->isActive;
  137.     }
  138.     /**
  139.      * Obsługa tłumaczeń
  140.      * @param $method
  141.      * @param $arguments
  142.      * @return mixed
  143.      */
  144.     public function __call($method$arguments)
  145.     {
  146.         return $this->proxyCurrentLocaleTranslation($method$arguments);
  147.     }
  148.     public function getName()
  149.     {
  150.         return $this->translate()->getName();
  151.     }
  152.     /**
  153.      * Set separator
  154.      *
  155.      * @param string $separator
  156.      *
  157.      * @return Currency
  158.      */
  159.     public function setSeparator($separator)
  160.     {
  161.         $this->separator $separator;
  162.         return $this;
  163.     }
  164.     /**
  165.      * Get separator
  166.      *
  167.      * @return string
  168.      */
  169.     public function getSeparator()
  170.     {
  171.         return $this->separator;
  172.     }
  173.     /**
  174.      * Set position
  175.      *
  176.      * @param string $position
  177.      *
  178.      * @return Currency
  179.      */
  180.     public function setPosition($position)
  181.     {
  182.         $this->position $position;
  183.         return $this;
  184.     }
  185.     /**
  186.      * Get position
  187.      *
  188.      * @return string
  189.      */
  190.     public function getPosition()
  191.     {
  192.         return $this->position;
  193.     }
  194.     /**
  195.      * @return mixed
  196.      */
  197.     public function getFactorPln()
  198.     {
  199.         return $this->factorPln;
  200.     }
  201.     /**
  202.      * @param mixed $factorPln
  203.      */
  204.     public function setFactorPln($factorPln): void
  205.     {
  206.         $this->factorPln $factorPln;
  207.     }
  208.     /**
  209.      * @return mixed
  210.      */
  211.     public function getIsoCode()
  212.     {
  213.         return $this->isoCode;
  214.     }
  215.     /**
  216.      * @param mixed $isoCode
  217.      */
  218.     public function setIsoCode($isoCode)
  219.     {
  220.         $this->isoCode $isoCode;
  221.     }
  222. }