diff options
author | Thomas Lange <code@nerdmind.de> | 2016-03-26 14:01:09 +0100 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2016-03-26 14:01:09 +0100 |
commit | 74d01962a6f77eb2b8138864f18ed53eb136c432 (patch) | |
tree | 1d6de62cdea46b167fc08231e1805988c94477ad /include/classes/BigPipe/Pagelet.php | |
parent | 1b951d0a00ec8b8255f56287fe36a51a5ed7ab75 (diff) | |
download | bigpipe-74d01962a6f77eb2b8138864f18ed53eb136c432.tar.gz bigpipe-74d01962a6f77eb2b8138864f18ed53eb136c432.tar.xz bigpipe-74d01962a6f77eb2b8138864f18ed53eb136c432.zip |
Custom pagelet ID's
Diffstat (limited to 'include/classes/BigPipe/Pagelet.php')
-rwxr-xr-x | include/classes/BigPipe/Pagelet.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/classes/BigPipe/Pagelet.php b/include/classes/BigPipe/Pagelet.php index d1c335f..3b5530c 100755 --- a/include/classes/BigPipe/Pagelet.php +++ b/include/classes/BigPipe/Pagelet.php @@ -28,9 +28,9 @@ class Pagelet { const PHASE_LOADJS = 3; # After all the JS resources have been loaded const PHASE_EXECJS = 4; # After the static JS code has been executed - public function __construct($priority = self::PRIORITY_NORMAL) { + public function __construct($customID = NULL, $priority = self::PRIORITY_NORMAL) { $this->phaseDoneJS = array_pad([], 5, []); - $this->ID = 'P'.++self::$count; + $this->ID = is_string($customID) ? $customID : 'P'.++self::$count; BigPipe::addPagelet($this, $priority); } |