TwigExtractor
class TwigExtractor extends AbstractFileExtractor implements ExtractorInterface
TwigExtractor extracts translation messages from a twig template.
Methods
bool
canBeExtracted(string $file)
No description
array
extractFromDirectory(string|array $directory)
No description
__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
extract(string|array $resource, MessageCatalogue $catalogue)
Extracts translation messages from files, a file or a directory to the catalogue.