CodeExtension
class CodeExtension extends AbstractExtension
Twig extension relate to PHP code and used by the profiler and the default exception templates.
Methods
__construct(string|FileLinkFormatter $fileLinkFormat, string $projectDir, string $charset)
No description
getFilters()
{@inheritdoc}
abbrClass($class)
No description
abbrMethod($method)
No description
string
formatArgs(array $args)
Formats an array as a string.
string
formatArgsAsText(array $args)
Formats an array as a string.
string
fileExcerpt(string $file, int $line, int $srcContext = 3)
Returns an excerpt of a code file around the given line number.
string
formatFile(string $file, int $line, string $text = null)
Formats a file path.
string|false
getFileLink(string $file, int $line)
Returns the link for a given file/line pair.
string|null
getFileRelative(string $file)
No description
formatFileFromText($text)
No description
formatLogMessage($message, array $context)
No description
getName()
{@inheritdoc}
static
fixCodeMarkup($line)
No description