src/Entity/DeliveryCountry.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  4. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  5. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  6. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  9. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  10. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  11. /**
  12.  * @Doctrine\ORM\Mapping\Entity
  13.  * @Doctrine\ORM\Mapping\Table(name="delivery_country")
  14.  */
  15. class DeliveryCountry implements TranslatableInterfaceBlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  16.     use BlameableTrait;
  17.     use TimestampableTrait;
  18.     use TranslatableTrait;
  19.     use SoftDeletableTrait;
  20.     
  21.     
  22.     
  23.     /**
  24.      * @Doctrine\ORM\Mapping\Id
  25.      * @Doctrine\ORM\Mapping\Column(type="integer")
  26.      * @Doctrine\ORM\Mapping\GeneratedValue(strategy="AUTO")
  27.      */
  28.     protected $id;
  29.     /**
  30.      * @Doctrine\ORM\Mapping\ManyToOne(targetEntity="App\Entity\Language")
  31.      * @Doctrine\ORM\Mapping\JoinColumn(name="lang_id", referencedColumnName="id")
  32.      */
  33.     protected $language;
  34.     /**
  35.      * Obsługa tłumaczeń
  36.      * @param $method
  37.      * @param $arguments
  38.      * @return mixed
  39.      */
  40.     public function __call($method$arguments)
  41.     {
  42.         return $this->proxyCurrentLocaleTranslation($method$arguments);
  43.     }
  44.     public function getName(){
  45.         return $this->translate()->getName();
  46.     }
  47.     /**
  48.      * Get id
  49.      *
  50.      * @return integer
  51.      */
  52.     public function getId()
  53.     {
  54.         return $this->id;
  55.     }
  56.     /**
  57.      * Set language
  58.      *
  59.      * @param \App\Entity\Language $language
  60.      *
  61.      * @return DeliveryCountry
  62.      */
  63.     public function setLanguage(\App\Entity\Language $language null)
  64.     {
  65.         $this->language $language;
  66.         return $this;
  67.     }
  68.     /**
  69.      * Get language
  70.      *
  71.      * @return \App\Entity\Language
  72.      */
  73.     public function getLanguage()
  74.     {
  75.         return $this->language;
  76.     }
  77. }