You are here

public function FrontMatter::getData in Drupal 8

Retrieves the extracted front matter data.

Return value

array The extracted front matter data.

Throws

\Drupal\Component\Serialization\Exception\InvalidDataTypeException Exception thrown when the Front Matter cannot be parsed.

File

core/modules/help_topics/src/FrontMatter.php, line 156

Class

FrontMatter
Extracts Front Matter from the beginning of a source.

Namespace

Drupal\help_topics

Code

public function getData() {
  return $this
    ->parse()['data'];
}