CodeExtension::getFileLink()

string getFileLink(string $file, int $line) Returns the link for a given file/line pair. Parameters string $file An absolute file path int $line The line number Return Value string A link of false

CodeHelper

class CodeHelper extends Helper CodeHelper. Methods setCharset(string $charset) Sets the default charset. from Helper string getCharset() Gets the default charset. from Helper __construct(string $fileLinkFormat, string $rootDir, string $charset) Constructor. string formatArgsAsText(array $args) Formats an array as a string. abbrClass($class) abbrMethod($method) string formatArgs(array $args) Formats an array as a string. string fileExcerpt(string $file,

CodeExtension::getName()

getName() {@inheritdoc}

CodeExtension::formatArgs()

string formatArgs(array $args) Formats an array as a string. Parameters array $args The argument array Return Value string

CodeExtension::formatArgsAsText()

string formatArgsAsText(array $args) Formats an array as a string. Parameters array $args The argument array Return Value string

CodeExtension::abbrMethod()

abbrMethod($method) Parameters $method

CodeExtension::abbrClass()

abbrClass($class) Parameters $class

CodeExtension::formatFile()

string formatFile(string $file, int $line, string $text = null) Formats a file path. Parameters string $file An absolute file path int $line The line number string $text Use this text for the link rather than the file path Return Value string

CodeExtension::fileExcerpt()

string fileExcerpt(string $file, int $line) Returns an excerpt of a code file around the given line number. Parameters string $file A file path int $line The selected line number Return Value string An HTML string

CodeExtension

class CodeExtension extends Twig_Extension Twig extension relate to PHP code and used by the profiler and the default exception templates. Methods __construct(string $fileLinkFormat, string $rootDir, string $charset) Constructor. getFilters() {@inheritdoc} abbrClass($class) abbrMethod($method) 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