![]() 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/old/app/code/Cnc/Catalog/Setup/Patch/Data/ |
<?php /** * @author Radosław Łańcucki <[email protected]> * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * @copyright Copyright (c) 2022 KDC (https://digitalcommerce.kaliop.com/) */ declare(strict_types=1); namespace Cnc\Catalog\Setup\Patch\Data; use Cnc\Catalog\Model\Config; use Cnc\Catalog\Setup\Patch\AbstractCatalogEavAttributeDataPatch; use Magento\Catalog\Model\Product; use Magento\Framework\Setup\Patch\DataPatchInterface; class UpdateOsComIdAttribute extends AbstractCatalogEavAttributeDataPatch implements DataPatchInterface { public function apply(): void { $update = [ 'is_filterable' => '0', 'is_filterable_in_search' => '0' ]; $eavSetup = $this->getEavSetup(); $eavSetup->updateAttribute( Product::ENTITY, Config::PRODUCT_ATTRIBUTE_CODE_OSCOMMERCE_ID, $update ); } /** * {@inheritDoc} */ public static function getDependencies(): array { return [ CreateOsComIdAttribute::class ]; } /** * {@inheritDoc} */ public function getAliases(): array { return []; } }