public function publish()
    {
        if ($this->_block->getPageId() && $this->_isSaved) {
            $searchText = $this->_block->search_weight > 0 ? $this->generateSearchText($this->_contentSaved) : '';
            $this->_block->publishContent($searchText);
        }
        return $this;
    }
public function publish()
    {
        if ($this->_block->getPageId() && $this->_isSaved) {
            $searchText = $this->_block->search_weight > 0 ? $this->generateSearchText($this->_contentSaved) : '';
            $this->_block->publishContent($searchText);
        }
        return $this;
    }
public function publish ( ) { if ( $ this -> _block -> getPageId ( ) && $ this -> _isSaved ) { $ searchText = $ this -> _block -> search_weight > 0 ? $ this -> generateSearchText ( $ this -> _contentSaved ) : '' ; $ this -> _block -> publishContent ( $ searchText ) ; } return $ this ; }
Should only be called after save
By default, updates search text and publishes a new page version
@return static
Should only be called after save By default updates search text and publishes a new page version