public function ymllink($str, $safe)
{
// There is absolutely no way anyone could possibly need this in a "safe" context
if ($safe) {
return null;
}
$matches = [];
if (preg_match('/ ([a-z0-9_-]+\\.yml)/i', $str, $matches)) {
$path = $this->app['url_generator']->generate('fileedit', ['namespace' => 'config', 'file' => $matches[1]]);
$link = sprintf(' <a href="%s">%s</a>', $path, $matches[1]);
$str = preg_replace('/ ([a-z0-9_-]+\\.yml)/i', $link, $str);
}
return $str;
}