original_string: protected function generateRelated()
      {
          $this->news_archives = $this->sortOutProtected(StringUtil::deserialize($this->news_archives, true));
  
          // Return if there are no archives
          if (count($this->news_archives) === 0) {
              return '';
          }
  
          $alias = Input::get('items') ?: Input::get('auto_item');
  
          // Return if the news item was not found
          if (($news = NewsModel::findPublishedByParentAndIdOrAlias($alias, $this->news_archives)) === null) {
              return '';
          }
  
          // Store the news item for further reference
          $this->currentNews = $news;
  
          return parent::generate();
      }
code: protected function generateRelated()
      {
          $this->news_archives = $this->sortOutProtected(StringUtil::deserialize($this->news_archives, true));
  
          // Return if there are no archives
          if (count($this->news_archives) === 0) {
              return '';
          }
  
          $alias = Input::get('items') ?: Input::get('auto_item');
  
          // Return if the news item was not found
          if (($news = NewsModel::findPublishedByParentAndIdOrAlias($alias, $this->news_archives)) === null) {
              return '';
          }
  
          // Store the news item for further reference
          $this->currentNews = $news;
  
          return parent::generate();
      }
code_tokens: protected function generateRelated ( ) { $ this -> news_archives = $ this -> sortOutProtected ( StringUtil :: deserialize ( $ this -> news_archives , true ) ) ; // Return if there are no archives if ( count ( $ this -> news_archives ) === 0 ) { return '' ; } $ alias = Input :: get ( 'items' ) ? : Input :: get ( 'auto_item' ) ; // Return if the news item was not found if ( ( $ news = NewsModel :: findPublishedByParentAndIdOrAlias ( $ alias , $ this -> news_archives ) ) === null ) { return '' ; } // Store the news item for further reference $ this -> currentNews = $ news ; return parent :: generate ( ) ; }
docstring: Generate the list in related categories mode
  
  Use the categories of the current news item. The module must be
  on the same page as news reader module.
  
  @return string
docstring_tokens: Generate the list in related categories mode