You are here

public function MarkdownParserInterface::loadPath in Markdown 3.0.x

Loads a cached ParsedMarkdown object for a local file system path.

Parameters

string $id: A unique identifier that will be used to cache the parsed markdown.

string $path: The local file system path of a markdown file to parse if the cached ParsedMarkdown object doesn't yet exist. Once parsed, its identifier will be set to the provided $id and then cached.

\Drupal\Core\Language\LanguageInterface $language: Optional. The language of the markdown that is being parsed.

Return value

\Drupal\markdown\ParsedMarkdownInterface A ParsedMarkdown object.

Throws

\Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException When the provided $path does not exist in the local file system.

1 method overrides MarkdownParserInterface::loadPath()
BaseParser::loadPath in src/Plugin/Markdown/BaseParser.php
Loads a cached ParsedMarkdown object for a local file system path.

File

src/Plugin/Markdown/MarkdownParserInterface.php, line 111

Class

MarkdownParserInterface
Interface MarkdownInterface.

Namespace

Drupal\markdown\Plugin\Markdown

Code

public function loadPath($id, $path, LanguageInterface $language = NULL);