$to_replace =
[ // Replace newlines with a logical 'or'.
'/(\r\n?|\n)/',
// Quote asterisks.
'/\\\\\*/',
// Quote <front> keyword.
'/(^|\|)\\\\<front\\\\>($|\|)/',
];
$replacements =
[ '|',
'.*',
'\1' .
preg_quote($this->
getFrontPagePath(), '/'
) . '\2',
];
$patterns_quoted =
preg_quote($patterns, '/'
);
$this->regexes
[$patterns] = '/^(' .
preg_replace($to_replace,
$replacements,
$patterns_quoted) . ')$/';
} return (bool) preg_match($this->regexes
[$patterns],
$path);
} /**
* {@inheritdoc}
*/
public function isFrontPage() {