onPreRender() публичный Метод

The method raises 'OnPreRender' event. If you override this method, be sure to call the parent implementation so that the event handlers can be invoked.
public onPreRender ( $param )
Пример #1
0
 /**
  * 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);
         }
     }
 }
Пример #2
0
 /**
  * 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);
 }