![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/app/code/Magefan/Community/Model/ |
<?php /** * Copyright © Magefan ([email protected]). All rights reserved. * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement). */ declare(strict_types=1); namespace Magefan\Community\Model; use Magento\Framework\App\Config\Storage\WriterInterface; use Magento\Framework\App\Cache\TypeListInterface; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Cache\Type\Config; class SetLinvFlag { /** * @var WriterInterface */ private $configWriter; /** * @var TypeListInterface */ private $cacheTypeList; /** * @param WriterInterface $configWriter * @param TypeListInterface $cacheTypeList */ public function __construct( WriterInterface $configWriter, TypeListInterface $cacheTypeList ) { $this->configWriter = $configWriter; $this->cacheTypeList = $cacheTypeList; } /** * @param $module * @param $value * @return void */ public function execute($module, $value) { $this->configWriter->save($module . '/g'.'en'.'er'.'al'.'/l'.'in'.'v', $value, ScopeConfigInterface::SCOPE_TYPE_DEFAULT, 0); $this->cacheTypeList->cleanType(Config::TYPE_IDENTIFIER); } }