You are here

public function MarkdownInterface::loadPath in Markdown 8.2

Same name and namespace in other branches
  1. 3.0.x src/MarkdownInterface.php \Drupal\markdown\MarkdownInterface::loadPath()

Loads a cached ParsedMarkdown object based on a file system path.

Parameters

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.

string $id: Optional. A unique identifier for caching the parsed markdown. If not set, one will be generated automatically based on the provided $path.

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

Return value

\Drupal\markdown\Render\ParsedMarkdownInterface A ParsedMarkdown object.

Throws

\Drupal\markdown\Exception\MarkdownFileNotExistsException

Deprecated

in markdown:8.x-2.0 and is removed from markdown:3.0.0. Use \Drupal\markdown\MarkdownInterface::loadFile instead.

See also

https://www.drupal.org/project/markdown/issues/3142418

1 method overrides MarkdownInterface::loadPath()
Markdown::loadPath in src/Markdown.php

File

src/MarkdownInterface.php, line 72

Class

MarkdownInterface
Interface MarkdownInterface.

Namespace

Drupal\markdown

Code

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