protected function _setTitle()
    {
        if (empty($this->viewVars['title_for_layout'])) {
            $title = option('site_title');
            $this->assign('title', $title);
            $this->set('title_for_layout', $title);
        } else {
            $this->assign('title', $this->viewVars['title_for_layout']);
        }
    }
protected function _setTitle()
    {
        if (empty($this->viewVars['title_for_layout'])) {
            $title = option('site_title');
            $this->assign('title', $title);
            $this->set('title_for_layout', $title);
        } else {
            $this->assign('title', $this->viewVars['title_for_layout']);
        }
    }
protected function _setTitle ( ) { if ( empty ( $ this -> viewVars [ 'title_for_layout' ] ) ) { $ title = option ( 'site_title' ) ; $ this -> assign ( 'title' , $ title ) ; $ this -> set ( 'title_for_layout' , $ title ) ; } else { $ this -> assign ( 'title' , $ this -> viewVars [ 'title_for_layout' ] ) ; } }
Sets title for layout.

It sets `title_for_layout` view variable, if no previous title was set on
controller. Site's title will be used if not found.

@return void
Sets title for layout .