Prado\Web\UI\WebControls\TMultiView::bubbleEvent PHP Метод

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

The method handles view-related command events.
public bubbleEvent ( $sender, $param ) : boolean
Результат boolean whether this event is handled
    public function bubbleEvent($sender, $param)
    {
        if (!$this->_ignoreBubbleEvents && $param instanceof \Prado\Web\UI\TCommandEventParameter) {
            switch ($param->getCommandName()) {
                case self::CMD_NEXTVIEW:
                    if (($index = $this->getActiveViewIndex()) < $this->getViews()->getCount() - 1) {
                        $this->setActiveViewIndex($index + 1);
                    } else {
                        $this->setActiveViewIndex(-1);
                    }
                    return true;
                case self::CMD_PREVIOUSVIEW:
                    if (($index = $this->getActiveViewIndex()) >= 0) {
                        $this->setActiveViewIndex($index - 1);
                    }
                    return true;
                case self::CMD_SWITCHVIEWID:
                    $view = $this->findControl($viewID = $param->getCommandParameter());
                    if ($view !== null && $view->getParent() === $this) {
                        $this->setActiveView($view);
                        return true;
                    } else {
                        throw new TInvalidDataValueException('multiview_viewid_invalid', $viewID);
                    }
                case self::CMD_SWITCHVIEWINDEX:
                    $index = TPropertyValue::ensureInteger($param->getCommandParameter());
                    $this->setActiveViewIndex($index);
                    return true;
            }
        }
        return false;
    }