You are here

protected function ContentLoader::getParser in YAML Content 8

Get the YAML parser service.

Return value

\Symfony\Component\Yaml\Parser The YAML parser service.

File

src/ContentLoader/ContentLoader.php, line 125

Class

ContentLoader
ContentLoader class for parsing and importing YAML content.

Namespace

Drupal\yaml_content\ContentLoader

Code

protected function getParser() {
  if (!isset($this->parser)) {
    $this->parser = new Parser();
  }
  return $this->parser;
}