You are here

public function Markdown::load in Markdown 8.2

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

Loads a cached ParsedMarkdown object.

Parameters

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

Overrides MarkdownInterface::load

2 calls to Markdown::load()
Markdown::loadFile in src/Markdown.php
Loads a cached ParsedMarkdown object based on system file.
Markdown::loadUrl in src/Markdown.php
Loads a cached ParsedMarkdown object based on a URL.

File

src/Markdown.php, line 102

Class

Markdown
Markdown service.

Namespace

Drupal\markdown

Code

public function load($id) {
  if ($id && ($cache = $this->cache
    ->get($id)) && $cache->data instanceof ParsedMarkdownInterface) {
    return $cache->data;
  }
}