Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
attribute_system_with_applyto_data.php
Go to the documentation of this file.
1 <?php
8  \Magento\Catalog\Model\ResourceModel\Eav\Attribute::class
9 );
10 $model->setName('system_attribute')->setId(3)->setEntityTypeId(4)->setIsUserDefined(0)->setApplyTo(['simple']);
11 $model->save();