init
This commit is contained in:
+42
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Esun\Wiki\Setup\Patch\Data;
|
||||
|
||||
use Magento\Framework\Setup\ModuleDataSetupInterface;
|
||||
use Magento\Framework\Setup\Patch\DataPatchInterface;
|
||||
|
||||
class EnableParameterComparisonForPrintingParameters implements DataPatchInterface
|
||||
{
|
||||
private const TARGET_SLUG = 'printing-parameters-download';
|
||||
|
||||
public function __construct(
|
||||
private readonly ModuleDataSetupInterface $moduleDataSetup
|
||||
) {
|
||||
}
|
||||
|
||||
public function apply(): self
|
||||
{
|
||||
$connection = $this->moduleDataSetup->getConnection();
|
||||
$table = $this->moduleDataSetup->getTable('esun_wiki_category');
|
||||
|
||||
$connection->update($table, ['show_parameter_comparison' => 0]);
|
||||
$connection->update(
|
||||
$table,
|
||||
['show_parameter_comparison' => 1],
|
||||
['slug = ?' => self::TARGET_SLUG]
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public static function getDependencies(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getAliases(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user