moduleDataSetup = $moduleDataSetup; $this->customerSetupFactory = $customerSetupFactory; $this->attributeSetFactory = $attributeSetFactory; } /** * @return void * @throws \Magento\Framework\Exception\LocalizedException * @throws \Magento\Framework\Validator\ValidateException */ public function apply(): void { $this->moduleDataSetup->getConnection()->startSetup(); /** @var CustomerSetup $customerSetup */ $customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]); $customerSetup->addAttribute( Customer::ENTITY, 'netsuite_status', [ 'label' => 'Netsuite Status', 'input' => 'text', 'type' => 'static', 'source' => '', 'required' => false, 'position' => 334, 'visible' => false, 'system' => false, 'backend' => '' ] ); $this->moduleDataSetup->getConnection()->endSetup(); } public function revert(): void { $this->moduleDataSetup->getConnection()->startSetup(); /** @var CustomerSetup $customerSetup */ $customerSetup = $this->customerSetupFactory->create(['setup' => $this->moduleDataSetup]); $customerSetup->removeAttribute(\Magento\Customer\Model\Customer::ENTITY, 'netsuite_status'); $this->moduleDataSetup->getConnection()->endSetup(); } /** * {@inheritdoc} */ public function getAliases(): array { return []; } /** * {@inheritdoc} */ public static function getDependencies(): array { return [ ]; } }