2024-11-22 21:34:45 +01:00
|
|
|
<?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);
|
|
|
|
|
2024-11-22 21:59:34 +01:00
|
|
|
namespace D3\ManufacturerInformation\Modules\Core;
|
2024-11-22 21:34:45 +01:00
|
|
|
|
|
|
|
use D3\ManufacturerInformation\Application\Model\Constants;
|
2025-01-03 15:06:20 +01:00
|
|
|
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
|
2024-11-22 21:34:45 +01:00
|
|
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
|
2025-01-03 15:06:20 +01:00
|
|
|
use Psr\Container\ContainerExceptionInterface;
|
|
|
|
use Psr\Container\NotFoundExceptionInterface;
|
2024-11-22 21:34:45 +01:00
|
|
|
|
2024-11-22 21:59:34 +01:00
|
|
|
class ManufacturerConfig extends ManufacturerConfig_parent
|
2024-11-22 21:34:45 +01:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param string $sName
|
2025-01-03 15:06:20 +01:00
|
|
|
*
|
2024-11-22 21:34:45 +01:00
|
|
|
* @return bool
|
2025-01-03 15:06:20 +01:00
|
|
|
* @throws ContainerExceptionInterface
|
|
|
|
* @throws NotFoundExceptionInterface
|
2024-11-22 21:34:45 +01:00
|
|
|
*/
|
|
|
|
public function d3GetBoolModuleSettingByName(string $sName): bool
|
|
|
|
{
|
2025-01-03 15:06:20 +01:00
|
|
|
$moduleSettingService = ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class);
|
2024-11-22 21:34:45 +01:00
|
|
|
|
|
|
|
return $moduleSettingService->getBoolean(Constants::OXID_MODULE_ID.$sName, Constants::OXID_MODULE_ID);
|
|
|
|
}
|
|
|
|
}
|