You are here

public function MarkdownInterface::getParser in Markdown 3.0.x

Same name and namespace in other branches
  1. 8.2 src/MarkdownInterface.php \Drupal\markdown\MarkdownInterface::getParser()

Retrieves a specific MarkdownParser.

Parameters

string $parser: The plugin identifier of the MarkdownParser to retrieve. If not provided, the first enabled Markdown filter in a text formatter available to the current user is used.

string|\Drupal\filter\Plugin\FilterInterface|\Drupal\filter\FilterFormatInterface $filter: Optional A specific filter plugin to use, a string representing a filter format or a FilterFormatInterface object containing a "markdown" filter.

\Drupal\Core\Session\AccountInterface $account: Optional. An account used to retrieve filters available filters if one wasn't already specified.

Return value

\Drupal\markdown\Plugin\Markdown\MarkdownParserInterface A MarkdownParser plugin.

1 method overrides MarkdownInterface::getParser()
Markdown::getParser in src/Markdown.php
Retrieves a specific MarkdownParser.

File

src/MarkdownInterface.php, line 195

Class

MarkdownInterface
Interface MarkdownInterface.

Namespace

Drupal\markdown

Code

public function getParser($parser = NULL, $filter = NULL, AccountInterface $account = NULL);