| Current Path : /var/www/html/app/code/FlipsDigital/CustomerTextbookList/Setup/ |
| Current File : /var/www/html/app/code/FlipsDigital/CustomerTextbookList/Setup/Uninstall.php |
<?php
/**
* Uninstall.php
*
* @copyright Copyright © 2021 FlipsDigital. All rights reserved.
* @author calvin.so@flipsdigital.com
*/
namespace FlipsDigital\CustomerTextbookList\Setup;
use Magento\Framework\Setup\UninstallInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
class Uninstall implements UninstallInterface
{
/**
* @var array
*/
protected $tablesToUninstall = [
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_entity',
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_eav_attribute',
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_entity_datetime',
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_entity_decimal',
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_entity_int',
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_entity_text',
CustomerTextbookListSetup::ENTITY_TYPE_CODE . '_entity_varchar'
];
/**
* {@inheritdoc}
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
*/
public function uninstall(SchemaSetupInterface $setup, ModuleContextInterface $context) //@codingStandardsIgnoreLine
{
$setup->startSetup();
foreach ($this->tablesToUninstall as $table) {
if ($setup->tableExists($table)) {
$setup->getConnection()->dropTable($setup->getTable($table));
}
}
$setup->endSetup();
}
}