Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All Data Structures Namespaces Files Functions Variables Pages
PrepareInitialConfig.php
Go to the documentation of this file.
1 <?php
8 
13 
20 {
24  private $moduleDataSetup;
25 
30  public function __construct(
31  ModuleDataSetupInterface $moduleDataSetup
32  ) {
33  $this->moduleDataSetup = $moduleDataSetup;
34  }
35 
39  public function apply()
40  {
41  $this->moduleDataSetup->getConnection()->insertMultiple(
42  $this->moduleDataSetup->getTable('core_config_data'),
43  [
44  [
45  'scope' => 'default',
46  'scope_id' => 0,
47  'path' => 'analytics/subscription/enabled',
48  'value' => 1
49  ],
50  [
51  'scope' => 'default',
52  'scope_id' => 0,
54  'value' => join(' ', SubscriptionHandler::CRON_EXPR_ARRAY)
55  ]
56  ]
57  );
58 
59  $this->moduleDataSetup->getConnection()->insert(
60  $this->moduleDataSetup->getTable('flag'),
61  [
63  'state' => 0,
64  'flag_data' => 24,
65  ]
66  );
67  }
68 
72  public static function getDependencies()
73  {
74  return [];
75  }
76 
80  public static function getVersion()
81  {
82  return '2.0.0';
83  }
84 
88  public function getAliases()
89  {
90  return [];
91  }
92 }
__construct(ModuleDataSetupInterface $moduleDataSetup)