Prado\Web\UI\WebControls\TMultiView::setActiveView PHP Method

setActiveView() public method

public setActiveView ( $view )
    public function setActiveView($view)
    {
        if (($index = $this->getViews()->indexOf($view)) >= 0) {
            $this->setActiveViewIndex($index);
        } else {
            throw new TInvalidOperationException('multiview_view_inexistent');
        }
    }

Usage Example

コード例 #1
0
ファイル: TActiveMultiView.php プロジェクト: pradosoft/prado
 /**
  * @param TView the view to be activated
  * @throws TInvalidOperationException if the view is not in the view collection
  */
 public function setActiveView($value)
 {
     parent::setActiveView($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         $this->getPage()->getAdapter()->registerControlToRender($this, $this->getResponse()->createHtmlWriter());
     }
 }