src/Entity/Product/ProductOptionValue.php line 17

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Product;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Sylius\Component\Product\Model\ProductOptionValue as BaseProductOptionValue;
  7. use Sylius\Component\Product\Model\ProductOptionValueTranslationInterface;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. /**
  10.  * @ORM\Entity
  11.  * @ORM\Table(name="sylius_product_option_value")
  12.  */
  13. class ProductOptionValue extends BaseProductOptionValue
  14. {
  15.     protected function createTranslation(): ProductOptionValueTranslationInterface
  16.     {
  17.         return new ProductOptionValueTranslation();
  18.     }
  19.     /**
  20.      * @Gedmo\SortablePosition
  21.      * @ORM\Column(name="position", type="integer")
  22.      */
  23.     private $position;
  24.     /**
  25.      * @ORM\Column(type="string", nullable=true)
  26.      */
  27.     private string $hexadecimal;
  28.     /**
  29.      * @ORM\Column(type="string", length=511, nullable=true)
  30.      */
  31.     protected ?string $filePath null;
  32.     protected ?File $file null;
  33.     /**
  34.      * @Gedmo\SortableGroup
  35.      * @var ProductOptionInterface|null
  36.      */
  37.     protected $option;
  38.     /**
  39.      * @return mixed
  40.      */
  41.     public function getPosition()
  42.     {
  43.         return $this->position;
  44.     }
  45.     /**
  46.      * @param mixed $position
  47.      */
  48.     public function setPosition($position): void
  49.     {
  50.         $this->position $position;
  51.     }
  52.     /**
  53.      * @return string|null
  54.      */
  55.     public function getFilePath(): ?string
  56.     {
  57.         return $this->filePath;
  58.     }
  59.     /**
  60.      * @param string|null $filePath
  61.      */
  62.     public function setFilePath(string $filePath): void
  63.     {
  64.         $this->filePath $filePath;
  65.     }
  66.     /**
  67.      * @return File|null
  68.      */
  69.     public function getFile(): ?File
  70.     {
  71.         return $this->file;
  72.     }
  73.     /**
  74.      * @param File|null $file
  75.      */
  76.     public function setFile(?File $file): void
  77.     {
  78.         $this->file $file;
  79.     }
  80.     public function getHexadecimal(): ?string
  81.     {
  82.         return $this->hexadecimal;
  83.     }
  84.     public function setHexadecimal(?string $hexadecimal): void
  85.     {
  86.         $this->hexadecimal $hexadecimal;
  87.     }
  88. }