You are here

public function ParsedMarkdown::getId in Markdown 8.2

Retrieves the identifier for this object.

Note: if no identifier is currently set, a unique hash based on the contents of the parsed HTML will be used.

Return value

string The identifier for this object.

Overrides ParsedMarkdownInterface::getId

1 call to ParsedMarkdown::getId()
ParsedMarkdown::getLabel in src/Render/ParsedMarkdown.php
Retrieves the human-readable label for this object.

File

src/Render/ParsedMarkdown.php, line 127

Class

ParsedMarkdown
The end result of parsing markdown into HTML.

Namespace

Drupal\markdown\Render

Code

public function getId() {
  if ($this->id === NULL) {
    $this->id = Crypt::hashBase64($this
      ->getMarkdown() . $this
      ->getHtml());
  }
  return $this->id;
}