/** * Trying to process MODX pages with Fenom template engine * * @param string $parentTag * @param string $content * @param bool $processUncacheable * @param bool $removeUnprocessed * @param string $prefix * @param string $suffix * @param array $tokens * @param int $depth * * @return int */ public function processElementTags($parentTag, &$content, $processUncacheable = false, $removeUnprocessed = false, $prefix = "[[", $suffix = "]]", $tokens = array(), $depth = 0) { if (is_string($content) && empty($parentTag) && $processUncacheable && !empty($this->pdoTools->config['useFenomParser'])) { $content = $this->pdoTools->fenom($content, $this->modx->placeholders); } return parent::processElementTags($parentTag, $content, $processUncacheable, $removeUnprocessed, $prefix, $suffix, $tokens, $depth); }
/** * Trying to process MODX pages with Fenom template engine * * @param string $parentTag * @param string $content * @param bool $processUncacheable * @param bool $removeUnprocessed * @param string $prefix * @param string $suffix * @param array $tokens * @param int $depth * * @return int */ public function processElementTags($parentTag, &$content, $processUncacheable = false, $removeUnprocessed = false, $prefix = "[[", $suffix = "]]", $tokens = array(), $depth = 0) { if (is_string($content) && $processUncacheable && !empty($this->pdoTools->config['useFenomParser']) && preg_match('#\\{(\\$|\\/|\\w+\\s)#', $content)) { $content = $this->pdoTools->fenom($content, $this->modx->placeholders); if (!empty($this->modx->resource) && is_object($this->modx->resource)) { $this->modx->resource->_jscripts = $this->modx->jscripts; $this->modx->resource->_sjscripts = $this->modx->sjscripts; $this->modx->resource->_loadedjscripts = $this->modx->loadedjscripts; } } return parent::processElementTags($parentTag, $content, $processUncacheable, $removeUnprocessed, $prefix, $suffix, $tokens, $depth); }