public static function MarkdownInterface::parseUrl in Markdown 3.0.x
Parses the contents of a URL containing markdown into HTML.
Parameters
string|\Drupal\Core\Url|\Psr\Http\Message\UriInterface $url: The external URL of a markdown file to parse.
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.
\Drupal\Core\Language\LanguageInterface $language: Optional. The language of the text that is being converted.
Return value
\Drupal\markdown\ParsedMarkdownInterface A ParsedMarkdown object.
Throws
\Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException When the provided $url does not exist or is not reachable.
1 method overrides MarkdownInterface::parseUrl()
- Markdown::parseUrl in src/
Markdown.php - Parses the contents of a URL containing markdown into HTML.
File
- src/
MarkdownInterface.php, line 176
Class
- MarkdownInterface
- Interface MarkdownInterface.
Namespace
Drupal\markdownCode
public static function parseUrl($url, $parser = NULL, $filter = NULL, AccountInterface $account = NULL, LanguageInterface $language = NULL);