public function onPreRenderComplete($param)
{
$this->raiseEvent('OnPreRenderComplete', $this, $param);
$cs = $this->getClientScript();
$theme = $this->getTheme();
if ($theme instanceof ITheme) {
foreach ($theme->getStyleSheetFiles() as $url) {
$cs->registerStyleSheetFile($url, $url, $this->getCssMediaType($url));
}
foreach ($theme->getJavaScriptFiles() as $url) {
$cs->registerHeadScriptFile($url, $url);
}
}
$styleSheet = $this->getStyleSheetTheme();
if ($styleSheet instanceof ITheme) {
foreach ($styleSheet->getStyleSheetFiles() as $url) {
$cs->registerStyleSheetFile($url, $url, $this->getCssMediaType($url));
}
foreach ($styleSheet->getJavaScriptFiles() as $url) {
$cs->registerHeadScriptFile($url, $url);
}
}
if ($cs->getRequiresHead() && $this->getHead() === null) {
throw new TConfigurationException('page_head_required');
}
}