MDL-81525 coer_enrol: Use stoppable trait for consistency
This commit is contained in:
@@ -29,11 +29,9 @@ use Psr\EventDispatcher\StoppableEventInterface;
|
||||
#[\core\attribute\label('Allows plugins or features to perform actions before the enrolment instance is deleted.')]
|
||||
#[\core\attribute\tags('enrol', 'user')]
|
||||
class before_enrol_instance_deleted implements
|
||||
StoppableEventInterface {
|
||||
/**
|
||||
* @var bool Whether the propagation of this event has been stopped.
|
||||
*/
|
||||
protected bool $stopped = false;
|
||||
StoppableEventInterface
|
||||
{
|
||||
use \core\hook\stoppable_trait;
|
||||
|
||||
/**
|
||||
* Constructor for the hook.
|
||||
@@ -45,15 +43,4 @@ class before_enrol_instance_deleted implements
|
||||
public readonly stdClass $enrolinstance,
|
||||
) {
|
||||
}
|
||||
|
||||
public function isPropagationStopped(): bool {
|
||||
return $this->stopped;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the propagation of this event.
|
||||
*/
|
||||
public function stop(): void {
|
||||
$this->stopped = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user