class TwigCommands extends DrushCommands (View source)

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected TwigEnvironment $twig
protected ModuleHandlerInterface $moduleHandler

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(TwigEnvironment $twig, ModuleHandlerInterface $moduleHandler)

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

TwigEnvironment
getTwig()

No description

ModuleHandlerInterface
getModuleHandler()

No description

RowsOfFields
unused($searchpaths)

Find potentially unused Twig templates.

twigCompile()

Compile all Twig template(s).

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct(TwigEnvironment $twig, ModuleHandlerInterface $moduleHandler)

Parameters

TwigEnvironment $twig
ModuleHandlerInterface $moduleHandler

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

TwigEnvironment getTwig()

Return Value

TwigEnvironment

ModuleHandlerInterface getModuleHandler()

Return Value

ModuleHandlerInterface

RowsOfFields unused($searchpaths)

Find potentially unused Twig templates.

Immediately before running this command, crawl your entire web site. Or use your Production PHPStorage dir for comparison.

Parameters

$searchpaths A comma delimited list of paths to recursively search

Return Value

RowsOfFields

twigCompile()

Compile all Twig template(s).