diff options
Diffstat (limited to 'include/classes/BigPipe/Pagelet.php')
-rwxr-xr-x | include/classes/BigPipe/Pagelet.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/classes/BigPipe/Pagelet.php b/include/classes/BigPipe/Pagelet.php index 42ea470..484a6e2 100755 --- a/include/classes/BigPipe/Pagelet.php +++ b/include/classes/BigPipe/Pagelet.php @@ -11,6 +11,7 @@ namespace BigPipe; class Pagelet extends Item { private $HTML = ''; private $JSCode = []; + private $priority = NULL; private $resources = []; private $dependencies = []; private $tagname = 'div'; @@ -38,6 +39,7 @@ class Pagelet extends Item { public function __construct($customID = NULL, $priority = self::PRIORITY_NORMAL) { $this->ID = $customID ?? 'P'.++self::$count; + $this->priority = $priority; $this->resources = array_pad($this->resources, 2, []); $this->phaseDoneJS = array_pad($this->phaseDoneJS, 5, []); @@ -45,6 +47,13 @@ class Pagelet extends Item { } #=============================================================================== + # Return the priority + #=============================================================================== + public function getPriority() { + return $this->priority; + } + + #=============================================================================== # Return the HTML content #=============================================================================== public function getHTML() { |