class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface

TwigExtractor extracts translation messages from a twig template.

Methods

__construct(Environment $twig)

No description

extract(string|array $resource, MessageCatalogue $catalogue)

Extracts translation messages from files, a file or a directory to the catalogue.

setPrefix(string $prefix)

Sets the prefix that should be used for new found messages.

Details

at line line 47
__construct(Environment $twig)

Parameters

Environment $twig

at line line 55
extract(string|array $resource, MessageCatalogue $catalogue)

Extracts translation messages from files, a file or a directory to the catalogue.

Parameters

string|array $resource Files, a file or a directory
MessageCatalogue $catalogue The catalogue

at line line 80
setPrefix(string $prefix)

Sets the prefix that should be used for new found messages.

Parameters

string $prefix The prefix