public function Markdown::getParser in Markdown 3.0.x
Same name in this branch
- 3.0.x src/Markdown.php \Drupal\markdown\Markdown::getParser()
- 3.0.x src/Plugin/Filter/Markdown.php \Drupal\markdown\Plugin\Filter\Markdown::getParser()
Retrieves the MarkdownParser plugin for this filter.
Return value
\Drupal\markdown\Plugin\Markdown\MarkdownParserInterface The MarkdownParser plugin.
Overrides MarkdownFilterInterface::getParser
File
- src/
Plugin/ Filter/ Markdown.php, line 75
Class
- Markdown
- Provides a filter for Markdown.
Namespace
Drupal\markdown\Plugin\FilterCode
public function getParser() {
if (!isset($this->parser)) {
$this->parser = $this->parserManager
->createInstance($this
->getSetting('parser', 'thephpleague/commonmark'), [
'filter' => $this,
]);
}
return $this->parser;
}