24 private $moduleDataSetup;
29 private $dataInstallerFactory;
39 \
Magento\Directory\Setup\DataInstallerFactory $dataInstallerFactory
41 $this->moduleDataSetup = $moduleDataSetup;
42 $this->dataInstallerFactory = $dataInstallerFactory;
48 public function apply()
51 $dataInstaller = $this->dataInstallerFactory->create();
52 $dataInstaller->addCountryRegions(
53 $this->moduleDataSetup->getConnection(),
54 $this->getDataForIndia()
63 private function getDataForIndia()
66 [
'IN',
'AN',
'Andaman and Nicobar Islands'],
67 [
'IN',
'AP',
'Andhra Pradesh'],
68 [
'IN',
'AR',
'Arunachal Pradesh'],
69 [
'IN',
'AS',
'Assam'],
70 [
'IN',
'BR',
'Bihar'],
71 [
'IN',
'CH',
'Chandigarh'],
72 [
'IN',
'CT',
'Chhattisgarh'],
73 [
'IN',
'DN',
'Dadra and Nagar Haveli'],
74 [
'IN',
'DD',
'Daman and Diu'],
75 [
'IN',
'DL',
'Delhi'],
77 [
'IN',
'GJ',
'Gujarat'],
78 [
'IN',
'HR',
'Haryana'],
79 [
'IN',
'HP',
'Himachal Pradesh'],
80 [
'IN',
'JK',
'Jammu and Kashmir'],
81 [
'IN',
'JH',
'Jharkhand'],
82 [
'IN',
'KA',
'Karnataka'],
83 [
'IN',
'KL',
'Kerala'],
84 [
'IN',
'LD',
'Lakshadweep'],
85 [
'IN',
'MP',
'Madhya Pradesh'],
86 [
'IN',
'MH',
'Maharashtra'],
87 [
'IN',
'MN',
'Manipur'],
88 [
'IN',
'ML',
'Meghalaya'],
89 [
'IN',
'MZ',
'Mizoram'],
90 [
'IN',
'NL',
'Nagaland'],
91 [
'IN',
'OR',
'Odisha'],
92 [
'IN',
'PY',
'Puducherry'],
93 [
'IN',
'PB',
'Punjab'],
94 [
'IN',
'RJ',
'Rajasthan'],
95 [
'IN',
'SK',
'Sikkim'],
96 [
'IN',
'TN',
'Tamil Nadu'],
97 [
'IN',
'TG',
'Telangana'],
98 [
'IN',
'TR',
'Tripura'],
99 [
'IN',
'UP',
'Uttar Pradesh'],
100 [
'IN',
'UT',
'Uttarakhand'],
101 [
'IN',
'WB',
'West Bengal']
111 InitializeDirectoryData::class,
__construct(ModuleDataSetupInterface $moduleDataSetup, \Magento\Directory\Setup\DataInstallerFactory $dataInstallerFactory)