Class

Symfony\Bundle\TwigBundle\Extension\CodeExtension

class CodeExtension extends Twig_Extension

Twig extension for Symfony code helper

Methods

__construct(ContainerInterface $container)

Constructor of Twig Extension to provide functions for code formatting

getFilters()

{@inheritdoc}

abbrClass($class)

abbrMethod($method)

formatArgs($args)

formatArgsAsText($args)

fileExcerpt($file, $line)

formatFile($file, $line, $text = null)

getFileLink($file, $line)

formatFileFromText($text)

getName()

Details

at line 31
public __construct(ContainerInterface $container)

Constructor of Twig Extension to provide functions for code formatting

Parameters

ContainerInterface $container A ContainerInterface instance

at line 39
public getFilters()

{@inheritdoc}

at line 53
public abbrClass($class)

Parameters

$class

at line 58
public abbrMethod($method)

Parameters

$method

at line 63
public formatArgs($args)

Parameters

$args

at line 68
public formatArgsAsText($args)

Parameters

$args

at line 73
public fileExcerpt($file, $line)

Parameters

$file
$line

at line 78
public formatFile($file, $line, $text = null)

Parameters

$file
$line
$text

Parameters

$file
$line

at line 88
public formatFileFromText($text)

Parameters

$text

at line 93
public getName()