framework/widgets/Pjax.php
public function init()
    {
        parent::init();
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }

        if ($this->requiresPjax()) {
            ob_start();
            ob_implicit_flush(false);
            $view = $this->getView();
            $view->clear();
            $view->beginPage();
            $view->head();
            $view->beginBody();
            if ($view->title !== null) {
                echo Html::tag('title', Html::encode($view->title));
            }
        } else {
            $options = $this->options;
            $tag = ArrayHelper::remove($options, 'tag', 'div');
            echo Html::beginTag($tag, array_merge([
                'data-pjax-container' => '',
                'data-pjax-push-state' => $this->enablePushState,
                'data-pjax-replace-state' => $this->enableReplaceState,
                'data-pjax-timeout' => $this->timeout,
                'data-pjax-scrollto' => $this->scrollTo,
            ], $options));
        }
    }
public function init()
    {
        parent::init();
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }

        if ($this->requiresPjax()) {
            ob_start();
            ob_implicit_flush(false);
            $view = $this->getView();
            $view->clear();
            $view->beginPage();
            $view->head();
            $view->beginBody();
            if ($view->title !== null) {
                echo Html::tag('title', Html::encode($view->title));
            }
        } else {
            $options = $this->options;
            $tag = ArrayHelper::remove($options, 'tag', 'div');
            echo Html::beginTag($tag, array_merge([
                'data-pjax-container' => '',
                'data-pjax-push-state' => $this->enablePushState,
                'data-pjax-replace-state' => $this->enableReplaceState,
                'data-pjax-timeout' => $this->timeout,
                'data-pjax-scrollto' => $this->scrollTo,
            ], $options));
        }
    }
public function init ( ) { parent :: init ( ) ; if ( ! isset ( $ this -> options [ 'id' ] ) ) { $ this -> options [ 'id' ] = $ this -> getId ( ) ; } if ( $ this -> requiresPjax ( ) ) { ob_start ( ) ; ob_implicit_flush ( false ) ; $ view = $ this -> getView ( ) ; $ view -> clear ( ) ; $ view -> beginPage ( ) ; $ view -> head ( ) ; $ view -> beginBody ( ) ; if ( $ view -> title !== null ) { echo Html :: tag ( 'title' , Html :: encode ( $ view -> title ) ) ; } } else { $ options = $ this -> options ; $ tag = ArrayHelper :: remove ( $ options , 'tag' , 'div' ) ; echo Html :: beginTag ( $ tag , array_merge ( [ 'data-pjax-container' => '' , 'data-pjax-push-state' => $ this -> enablePushState , 'data-pjax-replace-state' => $ this -> enableReplaceState , 'data-pjax-timeout' => $ this -> timeout , 'data-pjax-scrollto' => $ this -> scrollTo , ] , $ options ) ) ; } }
{@inheritdoc}
{