From f5a47cc5234847658573cc93a993ce1125fe17c5 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 7 Oct 2022 18:42:24 +0200 Subject: [PATCH] wait #5515 @0.25 --- src/Compiler/Compiler.php | 3 +-- src/Compiler/CompilerInterface.php | 2 +- src/Links/Link.php | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Compiler/Compiler.php b/src/Compiler/Compiler.php index 29fcfd6..720d840 100644 --- a/src/Compiler/Compiler.php +++ b/src/Compiler/Compiler.php @@ -325,7 +325,7 @@ class Compiler implements ShouldQueue, ShouldBeUnique, CompilerInterface } - public function addTriggersLink($page, $link) + public function addTriggersLink($page, $link, $delay = 0) { // TODO: Implement addTriggersLink() method. } @@ -365,5 +365,4 @@ class Compiler implements ShouldQueue, ShouldBeUnique, CompilerInterface } - } diff --git a/src/Compiler/CompilerInterface.php b/src/Compiler/CompilerInterface.php index ee724e8..430c644 100644 --- a/src/Compiler/CompilerInterface.php +++ b/src/Compiler/CompilerInterface.php @@ -8,7 +8,7 @@ interface CompilerInterface { public function addContentLock($page, $unlockConditions = ''); - public function addTriggersLink($page, $link); + public function addTriggersLink($page, $link, $delay=0); public function addAudiodescription($link); diff --git a/src/Links/Link.php b/src/Links/Link.php index a88da5a..baa9915 100644 --- a/src/Links/Link.php +++ b/src/Links/Link.php @@ -189,7 +189,9 @@ class Link return new DownloadPortionLink($id, $init, $compiler); case 38: if ($init['target'] != 'click') { - $compiler->addTriggersLink($init['page'], $init['to']); + $extras = self::parseExtras($init['extra']); + $delay = $extras['delay'] ?? 0; + $compiler->addTriggersLink($init['page'], $init['to'], $delay); } else { return new TriggerLink($id, $init, $compiler); } -- 2.39.5