$hooks->removeHook() method

Given a Hook ID provided by addHook() this removes the hook

To have a hook function remove itself within the hook function, say this is your hook function: function(HookEvent $event) { $event->removeHook(null); // remove self }

Usage

$wire = $hooks->removeHook(Wire $object, $hookID);

Arguments

NameType(s)Description
objectWire
hookIDstring, array, null

Can be single hook ID, array of hook IDs, or CSV string of hook IDs

Return value


$hooks methods and properties

API reference based on ProcessWire core version 3.0.248

Latest news

“We chose ProcessWire because of its excellent architecture, modular extensibility and the internal API. The CMS offers the necessary flexibility and performance for such a complex website like superbude.de. ProcessWire offers options that are only available for larger systems, such as Drupal, and allows a much slimmer development process.” —xport communication GmbH