Process::uninstall() method

Uninstall this Process

Note that the Modules class handles removal of any Permissions that the Process may have installed.

See the Module interface and the uninstall method there for more details.

Usage

$process->uninstall();

Hooking Process::uninstall()

You can add your own hook events that are executed either before or after the Process::uninstall() method is executed. Examples of both are included below. A good place for hook code such as this is in your /site/ready.php file.

Hooking before

The 'before' hooks are called immediately before each Process::uninstall() method call is executed. This type of hook is especially useful for modifying arguments before they are sent to the method.

$this->addHookBefore('Process::uninstall', function(HookEvent $event) {
  // Get the object the event occurred on, if needed
  $Process = $event->object;

  /* Your code here, perhaps modifying arguments */

  // Populate back arguments (if you have modified them)
});

Hooking after

The 'after' hooks are called immediately after each Process::uninstall() method call is executed. This type of hook is especially useful for modifying the value that was returned by the method call.

$this->addHookAfter('Process::uninstall', function(HookEvent $event) {
  // Get the object the event occurred on, if needed
  $Process = $event->object;

  // An 'after' hook can retrieve and/or modify the return value
  $return = $event->return;

  /* Your code here, perhaps modifying the return value */

  // Populate back return value, if you have modified it
  $event->return = $return;
});

Process methods and properties

API reference based on ProcessWire core version 3.0.178

Twitter updates

  • ProcessWire 3.0.181 has fixes and improvements as usual, but the biggest addition is a nice pull request for multi-language module translations, plus major updates to our Helloworld and ProcessHello demonstration modules. This post covers it all— More
    2 July 2021
  • ProcessWire 3.0.180 core updates– More
    18 June 2021
  • Today a new version of FormBuilder has been released in the FormBuilder support board (our 50th version) and it has a lot of interesting new features, which we’ll take a closer look at in this post— More
    11 June 2021

Latest news

  • ProcessWire Weekly #374
    In the 374th issue of ProcessWire Weekly we're going to cover the latest core updates, check out a total of three newly released third party modules, and more. Read on!
    Weekly.pw / 10 July 2021
  • ProcessWire 3.0.181 core updates + “Hello World”
    ProcessWire 3.0.181 has fixes and improvements as usual, but the biggest addition is a nice pull request from LostKobrakai, plus major updates to our Helloworld and ProcessHello demonstration modules. This post covers it all.
    Blog / 2 July 2021
  • Subscribe to weekly ProcessWire news

I just love the easy and intuitive ProcessWire API. ProcessWire rocks!” —Jens Martsch, Web developer