manufacturer-information/Modules/Core/ManufacturerConfig.php

42 lines
1.3 KiB
PHP
Raw Normal View History

<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe, Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\ManufacturerInformation\Modules\Core;
use D3\ManufacturerInformation\Application\Model\Constants;
2025-01-03 15:06:20 +01:00
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
2025-01-03 15:06:20 +01:00
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
class ManufacturerConfig extends ManufacturerConfig_parent
{
/**
* @param string $sName
2025-01-03 15:06:20 +01:00
*
* @return bool
2025-01-03 15:06:20 +01:00
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function d3GetBoolModuleSettingByName(string $sName): bool
{
2025-01-03 15:06:20 +01:00
$moduleSettingService = ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class);
return $moduleSettingService->getBoolean(Constants::OXID_MODULE_ID.$sName, Constants::OXID_MODULE_ID);
}
}