Update Events.php
This commit is contained in:
parent
d7359b6f77
commit
df8f50dff8
|
@ -85,6 +85,23 @@ trait Events
|
|||
$this->startUpdateSystem();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Unset event handler.
|
||||
*
|
||||
* @param bool $disableUpdateHandling Whether to also disable internal update handling (will cause errors, otherwise will simply use the NOOP handler)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unsetEventHandler(bool $disableUpdateHandling = false): void
|
||||
{
|
||||
$this->event_handler = null;
|
||||
$this->event_handler_instance = null;
|
||||
$this->event_handler_methods = [];
|
||||
$this->setNoop();
|
||||
if ($disableUpdateHandling) {
|
||||
$this->settings['updates']['handle_updates'] = false;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Get event handler.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue