/** * Calls the client script manager to add each of the requested client * script libraries. * @param mixed event parameter */ public function onPreRender($param) { parent::onPreRender($param); $scripts = preg_split('/,|\\s+/', $this->getPradoScripts()); $cs = $this->getPage()->getClientScript(); foreach ($scripts as $script) { if (($script = trim($script)) !== '') { $cs->registerPradoScript($script); } } }
/** * If your subclass overrides the onPreRender method be sure to call * this method through parent::onPreRender($param); so your sub-class can be decorated, * among other things. * @param TEventParameter event parameter to be passed to the event handlers */ public function onPreRender($param) { if ($decorator = $this->getDecorator(false)) { $decorator->instantiate(); } parent::onPreRender($param); }