function FrontMatter::load

Creates a new FrontMatter instance.

Parameters

string $source: A string source.

string $serializer: A class that implements \Drupal\Component\Serialization\SerializationInterface.

Return value

static

1 call to FrontMatter::load()
HelpTopicTwigLoader::getSourceContext in core/modules/help_topics/src/HelpTopicTwigLoader.php

File

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

Class

FrontMatter
Extracts Front Matter from the beginning of a source.

Namespace

Drupal\help_topics

Code

public static function load($source, $serializer = '\\Drupal\\Component\\Serialization\\Yaml') {
    return new static($source, $serializer);
}

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