$Pagelet->getID(),
'RESOURCES' => ['CSS' => $Pagelet->getCSSFiles(), 'JS' => $Pagelet->getJSFiles(), 'JS_CODE' => removeLineBreaksAndTabs($Pagelet->getJSCode())]
];
if($last) {
$data['IS_LAST'] = true;
}
echo '
'."\n";
echo ''."\n\n";
}
#====================================================================================================
# Sendet den Output-Buffer so weit wie möglich in Richtung User
#====================================================================================================
public static function flushOutputBuffer() {
ob_flush(); flush();
}
#====================================================================================================
# Alle Pagelets an Client schicken
#====================================================================================================
public static function render($async = FALSE) {
self::flushOutputBuffer();
$i = 0;
ksort(self::$pagelets);
foreach(array_reverse(self::$pagelets) as $priority => $pagelets) {
foreach($pagelets as $Pagelet) {
if(!self::isEnabled()) {
if($Pagelet->getJSCode()) {
echo ''."\n";
}
foreach($Pagelet->getCSSFiles() as $CSSFile) {
echo ''."\n";
}
foreach($Pagelet->getJSFiles() as $JSFile) {
echo ''."\n";
}
}
else {
self::pageletResponse($Pagelet, $async, (self::$count === ++$i));
self::flushOutputBuffer();
}
}
}
}
}