aboutsummaryrefslogtreecommitdiffstats
path: root/include/classes/BigPipe/DemoPagelet.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2015-12-26 16:37:25 +0100
committerThomas Lange <code@nerdmind.de>2015-12-26 16:37:25 +0100
commit6658708bdd775a6ab1352e0c36b4c7deafc52e84 (patch)
treee95ef6b6fb67e0d1ca42221e94631fa6123b6f22 /include/classes/BigPipe/DemoPagelet.php
parent903100ecb99ab926d4ac3be4eba11ea1c9800e12 (diff)
downloadbigpipe-6658708bdd775a6ab1352e0c36b4c7deafc52e84.tar.gz
bigpipe-6658708bdd775a6ab1352e0c36b4c7deafc52e84.tar.xz
bigpipe-6658708bdd775a6ab1352e0c36b4c7deafc52e84.zip
Multiple updates; new feature PhaseDoneJS
Diffstat (limited to 'include/classes/BigPipe/DemoPagelet.php')
-rwxr-xr-xinclude/classes/BigPipe/DemoPagelet.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/classes/BigPipe/DemoPagelet.php b/include/classes/BigPipe/DemoPagelet.php
new file mode 100755
index 0000000..a6c61e1
--- /dev/null
+++ b/include/classes/BigPipe/DemoPagelet.php
@@ -0,0 +1,17 @@
+<?php
+namespace BigPipe;
+
+class DemoPagelet extends Pagelet {
+
+ public function __construct($priority = Pagelet::PRIORITY_NORMAL) {
+ parent::__construct($priority);
+
+ $message = '%s: PhaseDoneJS for phase %s';
+
+ $this->addPhaseDoneJS(self::PHASE_ARRIVE, 'console.log("'.sprintf($message, $this->getID(), 'ARRIVE').'")');
+ $this->addPhaseDoneJS(self::PHASE_LOADCSS, 'console.log("'.sprintf($message, $this->getID(), 'LOADCSS').'")');
+ $this->addPhaseDoneJS(self::PHASE_PUTHTML, 'console.log("'.sprintf($message, $this->getID(), 'PUTHTML').'")');
+ $this->addPhaseDoneJS(self::PHASE_LOADJS, 'console.log("'.sprintf($message, $this->getID(), 'LOADJS').'")');
+ $this->addPhaseDoneJS(self::PHASE_EXECJS, 'console.log("'.sprintf($message, $this->getID(), 'EXECJS').'")');
+ }
+} \ No newline at end of file