![]() 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/dev/tests/integration/testsuite/Magento/Eav/_files/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); use Magento\Eav\Setup\EavSetup; use Magento\Eav\Setup\EavSetupFactory; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\TestFramework\Helper\Bootstrap; $objectManager = Bootstrap::getObjectManager(); $setup = $objectManager->get(ModuleDataSetupInterface::class); /** @var EavSetup $eavSetup */ $eavSetup = $objectManager->get(EavSetupFactory::class) ->create(['setup' => $setup]); $eavSetup->addAttribute( \Magento\Catalog\Model\Product::ENTITY, 'zzz', [ 'type' => 'int', 'backend' => '', 'frontend' => '', 'label' => 'zzz', 'input' => 'select', 'class' => '', 'source' => '', 'global' => 1, 'visible' => true, 'required' => true, 'user_defined' => true, 'default' => null, 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'used_in_product_listing' => false, 'unique' => true, 'apply_to' => '', 'system' => 1, 'group' => 'General', 'option' => ['values' => ["Black", "White", "Red", "Brown", "zzz", "Metallic"]] ] );