Deactivation
Last updated
Last updated
The deactivate logic is some logic executed each time the plugin got disabled.
It is possible to use that state to interrupt the plugin:
By cancelling crons.
By updating the settings.
In Launchpad, to create a logic to be executed when the plugin disabling, we need to create a deactivator.
To create a deactivator, any class can be used as the only requirement is to inside the docblock of at least one of the methods:
Once the deactivator class is created, it needs to be registered on a service provider to be loaded.
For that it is important to first using interface and trait:
It is then possible to have access to the inside :