<?php
namespace Biloba\IntlTranslationDictionary;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Doctrine\DBAL\Connection;
class BilobaIntlTranslationDictionary extends Plugin
{
public function uninstall(UninstallContext $context): void
{
parent::uninstall($context);
if ($context->keepUserData()) {
return;
}
$connection = $this->container->get(Connection::class);
// Delete all translations when uninstalling the plugin
$connection->exec('DROP TABLE IF EXISTS `biloba_intl_translation_dictionary_entry_translation`');
$connection->exec('DROP TABLE IF EXISTS `biloba_intl_translation_dictionary_entry`');
}
}