src/Component/Channel/Entity/Channel.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace BitBag\OpenMarketplace\Component\Channel\Entity;
  4. use BitBag\OpenMarketplace\Component\SEO\Entity\SEOContent;
  5. use BitBag\OpenMarketplace\Component\SEO\Entity\SEOContentTranslationInterface;
  6. use Dedi\SyliusSEOPlugin\Domain\SEO\Adapter\ReferenceableInterface;
  7. use Dedi\SyliusSEOPlugin\Domain\SEO\Adapter\ReferenceableTrait;
  8. use Dedi\SyliusSEOPlugin\Domain\SEO\Adapter\SeoAwareChannelTrait;
  9. use Dedi\SyliusSEOPlugin\Entity\SEOContentInterface;
  10. use Sylius\Component\Core\Model\Channel as BaseChannel;
  11. class Channel extends BaseChannel implements ChannelInterface
  12. {
  13.     use ReferenceableTraitSeoAwareChannelTrait;
  14.     private ?string $brevoApiKey null;
  15.     private bool $brevoTestMode false;
  16.     private ?int $brevoDirectoryId null;
  17.     public bool $isVendorStatsEnabled false;
  18.     public function getBrevoApiKey(): ?string
  19.     {
  20.         return $this->brevoApiKey;
  21.     }
  22.     public function setBrevoApiKey(?string $brevoApiKey): void
  23.     {
  24.         $this->brevoApiKey $brevoApiKey;
  25.     }
  26.     public function isBrevoTestMode(): bool
  27.     {
  28.         return $this->brevoTestMode;
  29.     }
  30.     public function setBrevoTestMode(bool $brevoTestMode): void
  31.     {
  32.         $this->brevoTestMode $brevoTestMode;
  33.     }
  34.     public function getBrevoDirectoryId(): ?int
  35.     {
  36.         return $this->brevoDirectoryId;
  37.     }
  38.     public function setBrevoDirectoryId(?int $brevoDirectoryId): void
  39.     {
  40.         $this->brevoDirectoryId $brevoDirectoryId;
  41.     }
  42.     public function getKeywords(): ?string
  43.     {
  44.         /** @var SEOContentInterface $referenceableContent */
  45.         $referenceableContent $this->getReferenceableContent();
  46.         /** @var SEOContentTranslationInterface $translation */
  47.         $translation $referenceableContent->getTranslation();
  48.         return $translation->getKeywords();
  49.     }
  50.     protected function createReferenceableContent(): ReferenceableInterface
  51.     {
  52.         return new SEOContent();
  53.     }
  54.     public function getIsVendorStatsEnabled(): bool
  55.     {
  56.         return $this->isVendorStatsEnabled;
  57.     }
  58.     public function setVendorStatsEnabled(bool $isVendorStatsEnabled): void
  59.     {
  60.         $this->isVendorStatsEnabled $isVendorStatsEnabled;
  61.     }
  62. }