Prado\Web\UI\WebControls\TWebControlDecorator::instantiate PHP Method

instantiate() public method

This call attaches the ensureTemplateDecoration to the TPage onSaveStateComplete so these controls don't have page states. This is as close to not influencing the page as possible.
public instantiate ( $outercontrol = null )
    public function instantiate($outercontrol = null)
    {
        if ($this->getPreTagTemplate() || $this->getPreContentsTemplate() || $this->getPostContentsTemplate() || $this->getPostTagTemplate()) {
            $this->_outercontrol = $outercontrol;
            if ($this->getUseState()) {
                $this->ensureTemplateDecoration();
            } else {
                $this->_control->getPage()->onSaveStateComplete[] = array($this, 'ensureTemplateDecoration');
            }
        }
    }