* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ declare(strict_types=1); namespace PrestaShop\Module\PsxDesign\Validator; if (!defined('_PS_VERSION_')) { exit; } use PrestaShop\Module\PsxDesign\Config\PsxDesignConfig; use PrestaShop\PrestaShop\Core\Addon\Theme\Theme; class FeaturesCompatibilityValidator { public const CLASSIC_THEME_NAME = 'classic'; private const ALLOWED_THEMES = [PsxDesignConfig::CLASSIC_THEME_NAME]; /** * @var Theme */ private $theme; public function __construct(Theme $theme) { $this->theme = $theme; } /** * @return bool */ public function colorCustomisationFeatureIsCompatible(): bool { return in_array($this->theme->getName(), self::ALLOWED_THEMES); } }