Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
EnableDirectiveParsing.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
8 
11 
17 {
21  private $moduleDataSetup;
22 
27  public function __construct(
28  ModuleDataSetupInterface $moduleDataSetup
29  ) {
30  $this->moduleDataSetup = $moduleDataSetup;
31  }
32 
36  public function apply()
37  {
38  $configTable = $this->moduleDataSetup->getTable('core_config_data');
39  $select = $this->moduleDataSetup->getConnection()->select()
40  ->from($configTable)
41  ->where('path = ?', 'catalog/frontend/parse_url_directives');
42  $config = $this->moduleDataSetup->getConnection()->fetchAll($select);
43  if (!empty($config)) {
44  $this->moduleDataSetup->getConnection()->update(
45  $configTable,
46  ['value' => '1'],
47  ['path = ?' => 'catalog/frontend/parse_url_directives', 'value IN (?)' => '0']
48  );
49  }
50  }
51 
55  public static function getDependencies()
56  {
57  return [];
58  }
59 
63  public function getAliases()
64  {
65  return [];
66  }
67 }
$config
Definition: fraud_order.php:17
__construct(ModuleDataSetupInterface $moduleDataSetup)