示例#1
0
 public function performCommonContentReplacements($string)
 {
     return templateReplacement::parse($string, $this->getCommonContentReplacementsVariables());
 }
示例#2
0
 /**
  * Formatages des données d'un newsRecordset communs aux listes et aux éléments.
  *
  * @param newsRecordset $rsPost
  * @return void
  */
 protected function commonPreparation(newsRecordset $rsPost)
 {
     # url post
     $rsPost->url = $rsPost->getPostUrl();
     # url rubrique
     $rsPost->category_url = $rsPost->getCategoryUrl();
     # author
     $rsPost->author = $rsPost->getPostAuthor();
     # récupération des images
     $rsPost->images = $rsPost->getImagesInfo();
     # récupération des fichiers
     $rsPost->files = $rsPost->getFilesInfo();
     # contenu
     if (!$this->config->enable_rte) {
         $rsPost->content = util::nlToP($rsPost->content);
     }
     # perform content replacements
     templateReplacement::setStartString('');
     templateReplacement::setEndString('');
     $aReplacements = array_merge($this->okt->getCommonContentReplacementsVariables(), $this->okt->getImagesReplacementsVariables($rsPost->images));
     $rsPost->content = templateReplacement::parse($rsPost->content, $aReplacements);
 }