Redaxscript\Parser::_parseReadmore PHP Method

_parseReadmore() protected method

parse the readmore tag
Since: 2.6.0
protected _parseReadmore ( string $content = null ) : string
$content string content to be parsed
return string
    protected function _parseReadmore($content = null)
    {
        $output = str_replace($this->_tagArray['readmore']['search'], null, $content);
        /* html elements */
        $linkElement = new Html\Element();
        $linkElement->init('a', ['class' => $this->_optionArray['className']['readmore']]);
        /* collect output */
        if ($this->_registry->get('lastTable') === 'categories' || !$this->_registry->get('fullRoute')) {
            $output = substr($output, 0, $this->_tagArray['readmore']['position']);
            if ($this->_optionArray['route']) {
                $output .= $linkElement->copy()->attr('href', $this->_registry->get('parameterRoute') . $this->_optionArray['route'])->text($this->_language->get('readmore'));
            }
        }
        return $output;
    }