You are here

public function FrontMatter::getContent in Drupal 9

Retrieves the extracted source content.

Return value

string The extracted source content.

Throws

\Drupal\Component\FrontMatter\Exception\FrontMatterParseException

File

core/lib/Drupal/Component/FrontMatter/FrontMatter.php, line 172

Class

FrontMatter
Component for parsing front matter from a source.

Namespace

Drupal\Component\FrontMatter

Code

public function getContent() : string {
  return $this
    ->parse()['content'];
}