Prado\Web\UI\ActiveControls\TCallbackClientScript::replace PHP Method

replace() protected method

Replace the content of an element with new content. The new content can be a string or a TControl component. If the content parameter is a TControl component, its rendered method will be called and its contents will be used for replacement.
See also: insertAbout
See also: insertBelow
See also: insertBefore
See also: insertAfter
protected replace ( $element, $content, $self )
    protected function replace($element, $content, $self)
    {
        if ($content instanceof TControl) {
            $boundary = $this->getRenderedContentBoundary($content);
            $content = null;
        } else {
            if ($content instanceof THtmlWriter) {
                $boundary = $this->getResponseContentBoundary($content);
                $content = null;
            } else {
                $boundary = null;
            }
        }
        $this->callClientFunction('Prado.Element.replace', array($element, $content, $boundary, $self));
    }