<?php
declare(strict_types=1);
namespace BitBag\OpenMarketplace\Component\Channel\Entity;
use BitBag\OpenMarketplace\Component\SEO\Entity\SEOContent;
use BitBag\OpenMarketplace\Component\SEO\Entity\SEOContentTranslationInterface;
use Dedi\SyliusSEOPlugin\Domain\SEO\Adapter\ReferenceableInterface;
use Dedi\SyliusSEOPlugin\Domain\SEO\Adapter\ReferenceableTrait;
use Dedi\SyliusSEOPlugin\Domain\SEO\Adapter\SeoAwareChannelTrait;
use Dedi\SyliusSEOPlugin\Entity\SEOContentInterface;
use Sylius\Component\Core\Model\Channel as BaseChannel;
class Channel extends BaseChannel implements ChannelInterface
{
use ReferenceableTrait, SeoAwareChannelTrait;
private ?string $brevoApiKey = null;
private bool $brevoTestMode = false;
private ?int $brevoDirectoryId = null;
public bool $isVendorStatsEnabled = false;
public function getBrevoApiKey(): ?string
{
return $this->brevoApiKey;
}
public function setBrevoApiKey(?string $brevoApiKey): void
{
$this->brevoApiKey = $brevoApiKey;
}
public function isBrevoTestMode(): bool
{
return $this->brevoTestMode;
}
public function setBrevoTestMode(bool $brevoTestMode): void
{
$this->brevoTestMode = $brevoTestMode;
}
public function getBrevoDirectoryId(): ?int
{
return $this->brevoDirectoryId;
}
public function setBrevoDirectoryId(?int $brevoDirectoryId): void
{
$this->brevoDirectoryId = $brevoDirectoryId;
}
public function getKeywords(): ?string
{
/** @var SEOContentInterface $referenceableContent */
$referenceableContent = $this->getReferenceableContent();
/** @var SEOContentTranslationInterface $translation */
$translation = $referenceableContent->getTranslation();
return $translation->getKeywords();
}
protected function createReferenceableContent(): ReferenceableInterface
{
return new SEOContent();
}
public function getIsVendorStatsEnabled(): bool
{
return $this->isVendorStatsEnabled;
}
public function setVendorStatsEnabled(bool $isVendorStatsEnabled): void
{
$this->isVendorStatsEnabled = $isVendorStatsEnabled;
}
}