$content = "{% line
$line %}" .
$frontMatter->
getContent();
$source =
new Source($content,
$source->
getName(),
$source->
getPath());
} } catch (FrontMatterParseException
$exception) { // Convert parse exception into a syntax exception for Twig and append
// the path/name of the source to help further identify where it occurred.
$message =
sprintf($exception->
getMessage() . ' in %s',
$source->
getPath() ?:
$source->
getName());
throw new SyntaxError($message,
$exception->
getSourceLine(),
$source,
$exception);
} return parent::
compileSource($source);
} /**
* Invalidates all compiled Twig templates.
*
* @see \drupal_flush_all_caches
*/
public function invalidate() { PhpStorageFactory::
get('twig'
)->
deleteAll();
$this->templateClasses =
[];
$this->state->
delete(static::CACHE_PREFIX_METADATA_KEY
);
}