src/Entity/CompareParameterValue.php line 24

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. use Doctrine\ORM\Mapping as ORM;
  12. /**
  13.  * @Doctrine\ORM\Mapping\Entity
  14.  * @Doctrine\ORM\Mapping\Table(name="compare_parameter_value")
  15.  * @Doctrine\ORM\Mapping\Entity()
  16.  */
  17. class CompareParameterValue implements TranslatableInterfaceBlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  18.     use BlameableTrait;
  19.     use TimestampableTrait;
  20.     use TranslatableTrait;
  21.     use SoftDeletableTrait;
  22.     
  23.     
  24.     
  25.     /**
  26.      * @var integer
  27.      *
  28.      * @ORM\Column(name="id", type="integer", nullable=false)
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="IDENTITY")
  31.      */
  32.     private $id;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity="App\Entity\CompareParameter", inversedBy="values")
  35.      */
  36.     private $parameter;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\Category")
  39.      */
  40.     private $category;
  41.     /**
  42.      * @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="compareValues")
  43.      */
  44.     private $product;
  45.     /**
  46.      * Obsługa tłumaczeń
  47.      * @param $method
  48.      * @param $arguments
  49.      * @return mixed
  50.      */
  51.     public function __call($method$arguments)
  52.     {
  53.         return $this->proxyCurrentLocaleTranslation($method$arguments);
  54.     }
  55.     public function getValue(){
  56.         return $this->translate()->getValue();
  57.     }
  58.     public function getId(): ?int
  59.     {
  60.         return $this->id;
  61.     }
  62.     
  63.     public function getParameter(): ?CompareParameter
  64.     {
  65.         return $this->parameter;
  66.     }
  67.     public function setParameter(?CompareParameter $parameter): self
  68.     {
  69.         $this->parameter $parameter;
  70.         return $this;
  71.     }
  72.     public function getProduct(): ?Product
  73.     {
  74.         return $this->product;
  75.     }
  76.     public function setProduct(?Product $product): self
  77.     {
  78.         $this->product $product;
  79.         return $this;
  80.     }
  81.     public function getCategory(): ?Category
  82.     {
  83.         return $this->category;
  84.     }
  85.     public function setCategory(?Category $category): self
  86.     {
  87.         $this->category $category;
  88.         return $this;
  89.     }
  90. }