QControlBase::RenderHelper PHP Метод

RenderHelper() защищенный Метод

if ($this->RenderHelper(func_get_args())) return;
protected RenderHelper ( $mixParameterArray, $strRenderMethod )
    protected function RenderHelper($mixParameterArray, $strRenderMethod)
    {
        // Make sure the form is already "RenderBegun"
        if (!$this->objForm || $this->objForm->FormStatus != QForm::FormStatusRenderBegun) {
            if (!$this->objForm) {
                $objExc = new QCallerException('Control\'s form does not exist.  It could be that you are attempting to render after RenderEnd() has been called on the form.');
            } else {
                if ($this->objForm->FormStatus == QForm::FormStatusRenderEnded) {
                    $objExc = new QCallerException('Control cannot be rendered after RenderEnd() has been called on the form.');
                } else {
                    $objExc = new QCallerException('Control cannot be rendered until RenderBegin() has been called on the form.');
                }
            }
            // Incremement because we are two-deep below the call stack
            // (e.g. the Render function call, and then this RenderHelper call)
            $objExc->IncrementOffset();
            throw $objExc;
        }
        // Make sure this hasn't yet been rendered
        if ($this->blnRendered || $this->blnRendering) {
            $objExc = new QCallerException('This control has already been rendered: ' . $this->strControlId);
            // Incremement because we are two-deep below the call stack
            // (e.g. the Render function call, and then this RenderHelper call)
            $objExc->IncrementOffset();
            throw $objExc;
        }
        // Let's remember *which* render method was used to render this control
        $this->strRenderMethod = $strRenderMethod;
        // Apply any overrides (if applicable)
        if (count($mixParameterArray) > 0) {
            if (gettype($mixParameterArray[0]) != QType::String) {
                // Pop the first item off the array
                $mixParameterArray = array_reverse($mixParameterArray);
                array_pop($mixParameterArray);
                $mixParameterArray = array_reverse($mixParameterArray);
            }
            // Override
            try {
                $this->OverrideAttributes($mixParameterArray);
            } catch (QCallerException $objExc) {
                // Incremement Twice because we are two-deep below the call stack
                // (e.g. the Render function call, and then this RenderHelper call)
                $objExc->IncrementOffset();
                $objExc->IncrementOffset();
                throw $objExc;
            }
        }
        // Because we may be re-rendering a parent control, we need to make sure all "children" controls are marked as NOT being on the page.
        foreach ($this->GetChildControls() as $objChildControl) {
            $objChildControl->blnOnPage = false;
        }
        // Finally, let's specify that we have begun rendering this control
        $this->blnRendering = true;
    }