/** * Inserts the scripts at the end of the body section. * @param string $output the output to be inserted with scripts. */ public function renderBodyEnd(&$output) { if ($this->packScriptFiles && $this->enableJavaScript) { $this->packScriptFiles(self::POS_END); } parent::renderBodyEnd($output); }
/** * Combines the scripts at the end of the body section * @param string $output */ public function renderBodyEnd(&$output) { if ($this->combineScripts) { $this->combineScripts(array(self::POS_END, self::POS_LOAD, self::POS_READY)); } parent::renderBodyEnd($output); }
public function renderBodyEnd(&$output) { if (isset($this->scriptFiles[self::POS_END])) { $this->scriptFiles[self::POS_END] = array($this->minifyController . "/" . $this->md5Group($this->scriptFiles[self::POS_END], "js")); } parent::renderBodyEnd($output); }
public function renderBodyEnd(&$output) { //merging if ($this->mergeJs) { $this->_mergeJs(self::POS_END); } parent::renderBodyEnd($output); }
/** * Inserts the scripts at the end of the body section. * @param string the output to be inserted with scripts. */ public function renderBodyEnd(&$output) { // $this->enableJavascript has been checked in parent::render() if ($this->combineScriptFiles) { $this->combineScriptFiles(self::POS_END); } parent::renderBodyEnd($output); }
/** * Inserts the scripts at the end of the body section (overrides parent method). * @param string $output the output to be inserted with scripts. * @since 2.0 */ public function renderBodyEnd(&$output) { $this->_minScriptProcessor('scripts', self::POS_END); parent::renderBodyEnd($output); }
/** * Will combine/compress JS if wanted/needed, and will continue with original * renderBodyEnd afterwards * * @param <type> $output */ public function renderBodyEnd(&$output) { $this->renderJs($output, parent::POS_END); parent::renderBodyEnd($output); }
/** * Will combine/compress JS if wanted/needed, and will continue with original * renderBodyEnd afterwards * * @param <type> $output */ public function renderBodyEnd(&$output) { if ($this->combineFiles) { if (isset($this->scriptFiles[parent::POS_END]) && count($this->scriptFiles[parent::POS_END]) !== 0) { $jsFiles = $this->scriptFiles[parent::POS_END]; if (!empty($this->excludeFiles)) { foreach ($jsFiles as &$fileName) (in_array($fileName, $this->excludeFiles)) AND $fileName = false; $jsFiles = array_filter($jsFiles); } $this->combineAndCompress('js',$jsFiles,parent::POS_END); } } parent::renderBodyEnd($output); }
/** * Inserts the scripts at the end of the body section. * @param string $output the output to be inserted with scripts. */ public function renderBodyEnd(&$output) { //do sort by order $this->sortScriptFiles(self::POS_END); $this->sortScriptFiles(self::POS_READY); $this->sortScriptFiles(self::POS_LOAD); $this->sortScriptFiles(self::POS_LAST); $this->sortScripts(self::POS_END); $this->sortScripts(self::POS_READY); $this->sortScripts(self::POS_LOAD); $this->sortScripts(self::POS_LAST); parent::renderBodyEnd($output); //render file at ready and load $fullPage = 0; $output = preg_replace('/(<\\/body\\s*>)/is', '<###end###>$1', $output, 1, $fullPage); $html = ''; if (isset($this->scriptFiles[self::POS_READY])) { foreach ($this->scriptFiles[self::POS_READY] as $scriptFile) { $html .= CHtml::scriptFile($scriptFile) . "\n"; } } if (isset($this->scriptFiles[self::POS_LOAD])) { foreach ($this->scriptFiles[self::POS_LOAD] as $scriptFile) { $html .= CHtml::scriptFile($scriptFile) . "\n"; } } $scripts = isset($this->scripts[self::POS_LAST]) ? $this->scripts[self::POS_LAST] : array(); if (!empty($scripts)) { // $html.=CHtml::script(implode("\n",$scripts))."\n"; foreach ($scripts as $script) { if (strpos($script, '<noscript>') === 0) { $html .= $script . "\n"; } else { $html .= "<script type=\"text/javascript\">" . $script . "</script>\n"; } } } if (isset($this->scriptFiles[self::POS_LAST])) { foreach ($this->scriptFiles[self::POS_LAST] as $scriptFile) { $html .= CHtml::scriptFile($scriptFile) . "\n"; } } if ($fullPage) { $output = str_replace('<###end###>', $html, $output); } else { $output = $output . $html; } }
/** * Inserts the scripts at the end of the body section. * * @param string the output to be inserted with scripts. */ public function renderBodyEnd(&$output) { $this->onBeforeOptimization('js', self::POS_END); $this->onOptimization('js', self::POS_END); $this->onAfterOptimization('js', self::POS_END); parent::renderBodyEnd($output); }