You are here

public static function FrontMatter::load in Drupal 8

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);
}