|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / a / home / dev2.destoffenstraat.com / app / code / Amasty / Geoip / Setup / |
Filename | /home/a/home/dev2.destoffenstraat.com/app/code/Amasty/Geoip/Setup/Uninstall.php |
Size | 1.23 kb |
Permission | rwxrwxrwx |
Owner | root : root |
Create time | 21-Aug-2025 12:26 |
Last modified | 23-Nov-2022 12:32 |
Last accessed | 22-Aug-2025 22:33 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) 2022 Amasty (https://www.amasty.com)
* @package GeoIP Data for Magento 2 (System)
*/
namespace Amasty\Geoip\Setup;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\UninstallInterface;
class Uninstall implements UninstallInterface
{
public function uninstall(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$this->uninstallTables($setup)
->uninstallConfigData($setup);
}
private function uninstallTables(SchemaSetupInterface $setup): self
{
$tablesToDrop = [
'amasty_geoip_block_v6',
'amasty_geoip_location',
'amasty_geoip_block'
];
foreach ($tablesToDrop as $table) {
$setup->getConnection()->dropTable(
$setup->getTable($table)
);
}
return $this;
}
private function uninstallConfigData(SchemaSetupInterface $setup): self
{
$setup->getConnection()->delete(
$setup->getTable('core_config_data'),
"`path` LIKE 'amgeoip%'"
);
return $this;
}
}
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) 2022 Amasty (https://www.amasty.com)
* @package GeoIP Data for Magento 2 (System)
*/
namespace Amasty\Geoip\Setup;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\UninstallInterface;
class Uninstall implements UninstallInterface
{
public function uninstall(SchemaSetupInterface $setup, ModuleContextInterface $context)
{
$this->uninstallTables($setup)
->uninstallConfigData($setup);
}
private function uninstallTables(SchemaSetupInterface $setup): self
{
$tablesToDrop = [
'amasty_geoip_block_v6',
'amasty_geoip_location',
'amasty_geoip_block'
];
foreach ($tablesToDrop as $table) {
$setup->getConnection()->dropTable(
$setup->getTable($table)
);
}
return $this;
}
private function uninstallConfigData(SchemaSetupInterface $setup): self
{
$setup->getConnection()->delete(
$setup->getTable('core_config_data'),
"`path` LIKE 'amgeoip%'"
);
return $this;
}
}