Convenience method for meta description

@param string $content
@param string|null $language (iso2: de, en-us, ...)
@param array $options Additional options
@return string HTML Markup
172251
public function metaDescription($content, $language = null, $options = []) {
		if (!empty($language)) {
			$options['lang'] = mb_strtolower($language);
		} elseif ($language !== false) {
			$options['lang'] = Configure::read('Config.locale');
		}
		return $this->Html->meta('description', $content, $options);
	}
1057479
protected function _get_description( $content ) {
		preg_match( '/<meta +?property=["\']og:description["\'][^\/>]*? content=["\']([^"\']+?)["\'].*?\/?>/si', $content, $reg );
		if ( ! empty( $reg[1] ) ) {
			return $reg[1];
		}

		preg_match( '/<meta +?name=["\']description["\'][^\/>]*? content=["\']([^"\']+?)["\'].*?\/?>/si', $content, $reg );
		if ( ! empty( $reg[1] ) ) {
			return $reg[1];
		}
	}
1107319
public function display($content, $options = [])
    {
        $content = parent::display($content, $options);
        if (!empty($options['source'])) {
            return $content;
        }
        if (isset($options['meta']) &&  !isset($options['nl2br'])) {
            $options['nl2br'] = $options['meta'];
        }
        if ((isset($options['nl2br']) && $options['nl2br']) || !isset($options['nl2br'])) {
            $content = nl2br($content);
        }
        if (!empty($options['length'])) {
            $options['keep_tags'] = empty($options['keep_tags']) ? '' : $options['keep_tags']; //ie <br>,<p>
            $content = StringHelper::cutString(strip_tags($content, $options['keep_tags']), $options['length']);
            if ($options['keep_tags'] && $content) {
                $dom = new DOMDocument; // fix unclosed html tags
                $dom->loadHTML($content);
                $content = $dom->saveBodyHTML();
            }
        }
        return $content;
    }
765469
public function keyword($title, $content, $options = [])
    {
        $data = array_merge([
            'title'   => $title, 
            'content' => $content
        ], $options);

        return $this->send('keyword', $data);
    }
948594
public function render($content, $data = [])
    {
        if (!$content) {
            return '';
        }

        $html = $this->renderTwig($content, $data);

        $html = Markdown::parseSafe($html);

        return $html;
    }
46500
public function getChildren(Content $content, Language $language)
    {
        return $content->children()
            ->with(self::$loadRelations)
            ->where('published_at', '<=', Carbon::now())
            ->whereHas('routes', function ($query) use ($language) {
                $query->where('routes.is_active', true)
                    ->where('language_code', $language->code);
            })
            ->orderBy('is_promoted', 'DESC')
            ->orderBy('is_sticky', 'DESC')
            ->orderBy('weight', 'ASC')
            ->orderBy('published_at', 'DESC')
            ->paginate(option('general', 'default_page_size', 20));
    }
1343398
public function display($content, $options = [])
    {
        if (!empty($options['meta']) || !empty($options['pageBuilder'])) {
            $content = preg_replace_callback(
                '/{{\s*\$(?P<block>\w*)\s*}}/',
                function ($matches) {
                    return str_replace('"', "'", strip_tags(PageBuilder::block($matches['block'])));
                },
                $content
            );
            $content = str_replace('%page_name%', PageBuilder::pageName(), $content);
            $content = str_replace('%site_name%', config('coaster::site.name'), $content);
        }
        if (!empty($options['meta'])) {
            $content = trim(str_replace(PHP_EOL, ' ', $content));
            $content = preg_replace('/\s+/', ' ', $content);
            $content = htmlentities(strip_tags(html_entity_decode($content, ENT_QUOTES, 'UTF-8')));
            $content = StringHelper::cutString($content);
        }
        return parent::display($content, $options);
    }
602774
public static function table(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("table", $content, $attributes);
    }
264425
public function getAnnotation($annotation, $content = null, $options = array())
    {
        return new Annotation($this->addPrefix($annotation), $content, $options);
    }
1047280
public function process($content, array $options = [])
    {
        $found = false;
        if (is_string($content)) {
            $tagNames = array_keys($this->tagNames);
            $tagNames[] = 'component';
            foreach ($tagNames as $tagName) {
                if (strpos($content, '<' . $tagName) !== false) {
                    $found = true;
                    break;
                }
            }
        }
        if ($content instanceof \IvoPetkov\HTMLServerComponent) {
            $found = true;
        }
        if ($found) {
            if (self::$newCompilerCache === null) {
                self::$newCompilerCache = new \IvoPetkov\BearFramework\Addons\HTMLServerComponents\Internal\Compiler();
            }
            $compiler = clone(self::$newCompilerCache);
            foreach ($this->aliases as $alias => $original) {
                $compiler->addAlias($alias, $original);
            }
            foreach ($this->tagNames as $tagName => $src) {
                $compiler->addTag($tagName, $src);
            }
            return $compiler->process($content, $options);
        }
        return $content;
    }
1104673
protected function getLanguageCodes(Content $content, $versionNo = null)
    {
        $version = $this->contentService->loadVersionInfo($content->contentInfo, $versionNo);

        return $version->languageCodes;
    }
1308594
public function MarkupMeta($name, $content, $encode = null)
    {
        if ($encode !== null) {
            return '<meta name="' . $name . '" content="' . $this->encodeContent($content, $encode) . '" />' . PHP_EOL;
        } else {
            return '<meta name="' . $name . '" content="' . $content . '" />' . PHP_EOL;
        }
    }
1037191
public function transform( $text, $options = null )
    {
        if ( null !== $options )
        {
            $this->setOptions( $options );
        }

        $parser = $this->extraEnabled
                ? new MarkdownExtraParser
                : new MarkdownParser;
        $parsed = $parser->transformMarkdown( $text );

        if ( ! empty( $this->linkTarget ) )
        {
            $parsed = preg_replace(
                '#<(a|form)((\s[^>]*)?)>(.*?)</\\1>#',
                '<$1 target="' . htmlspecialchars( $this->linkTarget ) . '"$2>$4</$1>',
                $parsed
            );
        }

        if ( $this->stripScripts )
        {
            $parsed = preg_replace(
                '#<script(\s[^>]*)?>.*?</script>#',
                '',
                $parsed
            );
        }

        return $parsed;
    }
1109379
public static HtmlTree META(String httpEquiv, String content, String charSet) {
        HtmlTree htmltree = new HtmlTree(HtmlTag.META);
        String contentCharset = content + "; charset=" + charSet;
        htmltree.addAttr(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv));
        htmltree.addAttr(HtmlAttr.CONTENT, contentCharset);
        return htmltree;
    }
1365430
public function tableCell($content, array $options = [])
    {
        return $this->formatTemplate('tablecell', [
            'attrs' => $this->templater()->formatAttributes($options),
            'content' => $content
        ]);
    }
427146
public function toContent($contents, $format, $options = array())
	{
		if (!($contents instanceof Registry))
		{
			$contents = new Registry($contents);
		}

		return $contents->toString($format, $options);
	}
1109804
protected function parseContent($content) {
        if(is_bool($content)) {
            $this->addLanguage($this->language, $content);
            return;
        }
        if (!$content) {
            return;
        }
        if (is_string($content)) {
            $this->addLanguage($this->language, $content);
            return;
        }
        foreach($content as $key => $data) {
            if (!empty($data[0]['sys']['linkType'])) {
                foreach($data as $link) {
                    $this->addLink($link['id'], $link['linkType'], $key);
                }
            } else {
                if (is_numeric($key)) {
                    $this->addLanguage($this->language, [$data]);
                } else {
                    $this->addLanguage($key, $data);
                }
            }
        }
    }