From dba8a1f7d056a30afe610b0d46d576498a1b377a Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 20 Apr 2023 23:41:10 +0200 Subject: [PATCH] use plugin Uninstaller (no direct action) --- src/Uninstall.php | 74 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/Uninstall.php diff --git a/src/Uninstall.php b/src/Uninstall.php new file mode 100644 index 0000000..faf04f6 --- /dev/null +++ b/src/Uninstall.php @@ -0,0 +1,74 @@ +plugins->moduleExists('Uninstaller')) { + return false; + } + + Uninstaller::instance() + ->addUserAction( + 'tables', + 'delete', + My::ALIAS_TABLE_NAME + ) + ->addUserAction( + 'plugins', + 'delete', + My::id() + ) + ->addUserAction( + 'versions', + 'delete', + My::id() + ) +/* + ->addDirectAction( + 'tables', + 'delete', + My::ALIAS_TABLE_NAME + ) + ->addDirectAction( + 'plugins', + 'delete', + My::id() + ) + ->addDirectAction( + 'versions', + 'delete', + My::id() + ) +//*/ + ; + + // no custom action + return false; + } +}