Пример #1
0
 /**
  * Should only be called after save
  * By default, updates search text and publishes a new page version
  * @return static
  */
 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;
 }