custom/plugins/LenzPlatformClp/src/Core/Content/Clp/ClpEntity.php line 8

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace LenzPlatformClp\Core\Content\Clp;
  3. use Shopware\Core\Content\Product\ProductCollection;
  4. use Shopware\Core\Framework\DataAbstractionLayer\{EntityEntityIdTrait};
  5. class ClpEntity extends Entity {
  6.     use EntityIdTrait;
  7.     /**
  8.      * @var string
  9.      */
  10.     protected $type;
  11.     /**
  12.      * @var string
  13.      */
  14.     protected $slug;
  15.     /**
  16.      * @var string
  17.      */
  18.     protected $name;
  19.      /**
  20.      * @var string
  21.      */
  22.     protected $text;
  23.      /**
  24.      * @var string
  25.      */
  26.     protected $image;
  27.     /**
  28.      * @var ProductCollection|null
  29.      */
  30.     protected $products;
  31.     public function getProducts(): ?ProductCollection
  32.     {
  33.         return $this->products;
  34.     }
  35.     public function setProducts(ProductCollection $products): void
  36.     {
  37.         $this->products $products;
  38.     }
  39.     public function getType(): string
  40.     {
  41.         return $this->type;
  42.     }
  43.     public function setType(string $type): void
  44.     {
  45.         $this->type $type;
  46.     }
  47.     public function getName(): ?string
  48.     {
  49.         return $this->name;
  50.     }
  51.     public function setName(string $name): void
  52.     {
  53.         $this->name $name;
  54.     }
  55.     public function getSlug(): ?string
  56.     {
  57.         return $this->slug;
  58.     }
  59.     public function setSlug(string $slug): void
  60.     {
  61.         $this->slug $slug;
  62.     }
  63.     public function getText(): ?string
  64.     {
  65.         return $this->text;
  66.     }
  67.     public function setText(string $text): void
  68.     {
  69.         $this->text $text;
  70.     }
  71.     public function getImage(): ?string
  72.     {
  73.         return $this->image;
  74.     }
  75.     public function setImage(string $imageUrl): void
  76.     {
  77.         $this->image $imageUrl;
  78.     }
  79.     public static function slugify(string $key) : string
  80.     {
  81.         return strtolower(str_replace([" "";""_"], [""""""], $key));
  82.     }
  83. }