Launchpad
Launchpad
Launchpad
  • Introduction
  • General
    • Installation
    • Creating a subscriber
    • Contributing
  • Tutorials
    • Beginner documentation
      • Beginner handbook
        • Creating subscribers
        • Wiring subscribers
        • Installing local environment
        • Adding front-end
        • Building the plugin
      • Plugin life circle
        • Activation
        • Deactivation
        • Uninstall
    • Starting with the framework
    • Migrating to Launchpad
    • Notions
      • Framework concepts
        • Inversion of control
        • Subscribers
        • Dispatcher
      • Good practices
        • Hooks
          • Preventing magic constants
          • Decouple features
          • Sanitize filters output
      • Testing
        • Organize tests
  • CLI
    • Commands
    • Creating a command
  • Testing
    • Unit test
    • Fixtures
    • Integration test
  • Container
    • Architecture
    • Parameters
    • Providers
    • Auto wiring
    • Manual wiring
    • Activation/Deactivation
    • Inflectors
  • Modules
    • Definition
    • Listing
      • Action Scheduler
      • BerlinDB
      • Bus
      • Options
      • Renderer
      • Logger
      • Uninstaller
      • Filesystem
      • Front-end
      • Hook extractor
    • Creating a module
Powered by GitBook
On this page
  • Description
  • Install
  • Structure
  1. Modules
  2. Listing

Uninstaller

Description

This module offers you a way to execute actions on the plugin uninstall easily while still respecting a modern architecture.

Install

To install that library run the following command: composer require wp-launchpad/uninstaller-take-off --dev

Structure

This module creates a uninstall.php file at the root of your plugin that will load selected service providers on uninstall and run action from Uninstaller.

Load a service provider

To load a service provider it needs to match of theses conditions:

  • Implementing the interface LaunchpadUninstaller\Uninstall\UninstallServiceProviderInterface.

  • Implementing the interface LaunchpadUninstaller\Uninstall\HasUninstallerServiceProviderInterface and return at least one Uninstaller.

Load an uninstaller

To create an Uninstaller it needs to implement the interface LaunchpadUninstaller\Uninstall\UninstallerInterface and be registered in the method get_uninstallers from a service provider.

PreviousLoggerNextFilesystem

Last updated 2 years ago