. namespace test_plugin\hook; use Psr\EventDispatcher\StoppableEventInterface; /** * Fixture for testing of hooks. * * @package core * @author Petr Skoda * @copyright 2022 Open LMS * @license https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ final class stoppablehook implements StoppableEventInterface, \core\hook\described_hook { /** @var bool stoppable flag */ private $stopped = false; /** * Hook description. */ public static function get_hook_description(): string { return 'Test hook 2.'; } /** * Stop other callbacks. */ public function stop(): void { $this->stopped = true; } /** * Indicates if callback propagation should stop. */ public function isPropagationStopped(): bool { return $this->stopped; } /** * List of tags that describe this hook. * * @return string[] */ public static function get_hook_tags(): array { return ['test']; } }