src/Entity/Product/ProductOption.php line 15

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 Sylius\Component\Product\Model\ProductOption as BaseProductOption;
  6. use Sylius\Component\Product\Model\ProductOptionTranslationInterface;
  7. /**
  8.  * @ORM\Entity
  9.  * @ORM\Table(name="sylius_product_option")
  10.  */
  11. class ProductOption extends BaseProductOption implements ProductOptionInterface
  12. {
  13.     /**
  14.      * @ORM\Column(type="boolean")
  15.      */
  16.     private $required true;
  17.     /**
  18.      * @ORM\Column(type="boolean")
  19.      */
  20.     private $multiple false;
  21.     /**
  22.      * @ORM\Column(type="boolean")
  23.      */
  24.     private $switcher false;
  25.     protected function createTranslation(): ProductOptionTranslationInterface
  26.     {
  27.         return new ProductOptionTranslation();
  28.     }
  29.     public function isRequired(): bool
  30.     {
  31.         return $this->required;
  32.     }
  33.     public function setRequired(bool $required): void
  34.     {
  35.         $this->required $required;
  36.     }
  37.     public function isMultiple(): bool
  38.     {
  39.         return $this->multiple;
  40.     }
  41.     public function setMultiple(bool $multiple): void
  42.     {
  43.         $this->multiple $multiple;
  44.     }
  45.     public function isSwitcher(): bool
  46.     {
  47.         return $this->switcher;
  48.     }
  49.     public function setSwitcher(bool $switcher): void
  50.     {
  51.         $this->switcher $switcher;
  52.     }
  53. }