Prado\Web\UI\ActiveControls\TActivePanel::render PHP Method

render() public method

When render() is called before the OnPreRender event, such as when render() is called during a callback event handler, the rendering is defered until OnPreRender event is raised.
public render ( $writer )
    public function render($writer)
    {
        if ($this->getHasPreRendered()) {
            parent::render($writer);
            if ($this->getActiveControl()->canUpdateClientSide()) {
                $this->getPage()->getCallbackClient()->replaceContent($this, $writer);
            }
        } else {
            $this->getPage()->getAdapter()->registerControlToRender($this, $writer);
            if ($this->getHasControls()) {
                // If we update a TActivePanel on callback,
                // We shouldn't update all childs, because the whole content will be replaced by
                // the parent
                foreach ($this->findControlsByType('IActiveControl', false) as $control) {
                    $control->getActiveControl()->setEnableUpdate(false);
                }
            }
        }
    }

Usage Example

コード例 #1
0
ファイル: TReCaptcha2.php プロジェクト: pradosoft/prado
 public function render($writer)
 {
     $this->registerClientScript();
     parent::render($writer);
 }
All Usage Examples Of Prado\Web\UI\ActiveControls\TActivePanel::render