function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)
{
foreach ($this->_styleSheets as &$list) {
ksort($list);
}
$this->assign('stylesheets', $this->_styleSheets);
foreach ($this->_javaScripts as &$list) {
ksort($list);
}
$this->assign('scripts', $this->_javaScripts);
foreach ($this->_htmlHeaders as &$list) {
ksort($list);
}
$this->assign('headers', $this->_htmlHeaders);
// If no compile ID was assigned, get one.
if (!$compile_id) {
$compile_id = $this->getCompileId($resource_name);
}
$result = null;
if ($display == false && HookRegistry::call('TemplateManager::fetch', array($this, $resource_name, $cache_id, $compile_id, &$result))) {
return $result;
}
return parent::fetch($resource_name, $cache_id, $compile_id, $display);
}