Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UpdateVATNumber.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Setup\CustomerSetupFactory;
26 
28 {
32  private $moduleDataSetup;
33 
37  private $customerSetupFactory;
38 
44  public function __construct(
45  ModuleDataSetupInterface $moduleDataSetup,
46  CustomerSetupFactory $customerSetupFactory
47  ) {
48  $this->moduleDataSetup = $moduleDataSetup;
49  $this->customerSetupFactory = $customerSetupFactory;
50  }
51 
55  public function apply()
56  {
57  $customerSetup = $this->customerSetupFactory->create(['resourceConnection' => $this->moduleDataSetup]);
58  $customerSetup->updateAttribute('customer_address', 'vat_id', 'frontend_label', 'VAT Number');
59  }
60 
64  public static function getDependencies()
65  {
66  return [
67  ConvertValidationRulesFromSerializedToJson::class,
68  ];
69  }
70 
74  public static function getVersion()
75  {
76  return '2.0.12';
77  }
78 
82  public function getAliases()
83  {
84  return [];
85  }
86 }
__construct(ModuleDataSetupInterface $moduleDataSetup, CustomerSetupFactory $customerSetupFactory)