src/Entity/Product/ProductVariant.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\Core\Model\ProductVariant as BaseProductVariant;
  6. use Sylius\Component\Product\Model\ProductVariantTranslationInterface;
  7. /**
  8.  * @ORM\Entity
  9.  * @ORM\Table(name="sylius_product_variant")
  10.  */
  11. class ProductVariant extends BaseProductVariant
  12. {
  13.     /**
  14.      * @ORM\Column(type="string", length=255, nullable=true)
  15.      */
  16.     private $shortname;
  17.     /**
  18.      * @ORM\Column(type="string", nullable=true)
  19.      */
  20.     private $synapsCode;
  21.     protected function createTranslation(): ProductVariantTranslationInterface
  22.     {
  23.         return new ProductVariantTranslation();
  24.     }
  25.     public function getShortname(): ?string
  26.     {
  27.         return $this->shortname;
  28.     }
  29.     public function setShortname(?string $shortname): self
  30.     {
  31.         $this->shortname $shortname;
  32.         return $this;
  33.     }
  34.     /**
  35.      * @return mixed
  36.      */
  37.     public function getSynapsCode()
  38.     {
  39.         return $this->synapsCode;
  40.     }
  41.     /**
  42.      * @param mixed $synapsCode
  43.      * @return Product
  44.      */
  45.     public function setSynapsCode($synapsCode)
  46.     {
  47.         $this->synapsCode $synapsCode;
  48.         return $this;
  49.     }
  50. }