You are here

public function VarnishPurgerBase::delete in Varnish purger 8.2

Same name and namespace in other branches
  1. 8 src/Plugin/Purge/Purger/VarnishPurgerBase.php \Drupal\varnish_purger\Plugin\Purge\Purger\VarnishPurgerBase::delete()

The current instance of this purger plugin is about to be deleted.

When end-users decide to uninstall this purger through the user interface, this method gets called. Especially when this purger is multi-instantiable this gets useful as it allows to remove configuration and perform cleanup prior to when the instance gets uninstalled.

Overrides PurgerBase::delete

See also

\Drupal\purge\Plugin\Purge\Purger\PurgersServiceInterface::setPluginsEnabled()

File

src/Plugin/Purge/Purger/VarnishPurgerBase.php, line 73

Class

VarnishPurgerBase
Abstract base class for HTTP based configurable purgers.

Namespace

Drupal\varnish_purger\Plugin\Purge\Purger

Code

public function delete() {
  VarnishPurgerSettings::load($this
    ->getId())
    ->delete();
}