TwigExtractor
class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
TwigExtractor extracts translation messages from a twig template.
Methods
Details
Parameters
string|array | $resource | Files, a file or a directory |
Return Value
protected bool
isFile(string $file)
Parameters
Return Value
Exceptions
Parameters
Return Value
Parameters
Return Value
array | files to be extracted |
__construct(Environment $twig)
Parameters
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 |
setPrefix(string $prefix)
Sets the prefix that should be used for new found messages.
Parameters
string | $prefix | The prefix |
Parameters