function FrontMatter::getCode

Retrieves the extracted source code.

Return value

string The extracted source code.

Throws

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

File

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

Class

FrontMatter
Extracts Front Matter from the beginning of a source.

Namespace

Drupal\help_topics

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.