-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfooter.php
35 lines (30 loc) · 833 Bytes
/
footer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// No direct access
defined('JPATH_BASE') or die;
/**
* JDocument footer renderer
*/
class JDocumentRendererFooter extends JDocumentRenderer
{
public function render($footer, $params = array(), $content = null)
{
ob_start();
echo $this->fetchFooter($this->_doc);
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
}
public function fetchFooter(&$document)
{
$app = JFactory::getApplication();
$app->triggerEvent('onBeforeCompileFooter');
$lnEnd = $document->_getLineEnd();
$tab = $document->_getTab();
$buffer = '';
foreach ($document->_footer_scripts as $strSrc => $strType) {
$buffer .= $tab.'<script type="'.$strType['mime'].'" src="'.$strSrc.'"></script>'.$lnEnd;
}
return $buffer;
}
}
?>