onPreRender() public method

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
ファイル: TClientScript.php プロジェクト: pradosoft/prado
 /**
  * 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
ファイル: TWebControl.php プロジェクト: pradosoft/prado
 /**
  * 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);
 }