/** * Parse the template file and return it as string * * @return string The template markup */ public function parse() { if ($this->strTemplate == '') { return ''; } // HOOK: add custom parse filters if (isset($GLOBALS['TL_HOOKS']['parseTemplate']) && is_array($GLOBALS['TL_HOOKS']['parseTemplate'])) { foreach ($GLOBALS['TL_HOOKS']['parseTemplate'] as $callback) { $this->import($callback[0]); $this->{$callback}[0]->{$callback}[1]($this); } } return parent::parse(); }
/** * Parse the template file and return it as string * * @param array $arrAttributes An optional attributes array * * @return string The template markup */ public function parse($arrAttributes = null) { if ($this->strTemplate == '') { return ''; } $this->addAttributes($arrAttributes); $this->mandatoryField = $GLOBALS['TL_LANG']['MSC']['mandatory']; if ($this->customTpl != '' && TL_MODE == 'FE') { $this->strTemplate = $this->customTpl; } $strBuffer = parent::parse(); // HOOK: add custom parse filters (see #5553) if (isset($GLOBALS['TL_HOOKS']['parseWidget']) && is_array($GLOBALS['TL_HOOKS']['parseWidget'])) { foreach ($GLOBALS['TL_HOOKS']['parseWidget'] as $callback) { $this->import($callback[0]); $strBuffer = $this->{$callback}[0]->{$callback}[1]($strBuffer, $this); } } return $strBuffer; }