robo-tasks robo-twig
Allow the processing of templates via robo
heydon/robo-twig
Allow the processing of templates via robo
- Wednesday, June 20, 2018
- by gheydon
- Repository
- 1 Watchers
- 0 Stars
- 597 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 753 % Grown
robo-twig
Use twig as a templating system system for robo, (*1)
Usage
- Use with template in memory, and displaying to the screen
$this->taskTwig()
->setTemplatesArray('index', 'Hello {{ name }}!')
->setContext('name', 'Fabien')
->applyTemplate('index', '')
->run();
- Use with template file and write to destination
$this->taskTwig()
->setTemplatesDirectory('./templates')
->setContext('name', 'Fabien')
->applyTemplate('index.twig', 'index.txt')
->applyTemplate('index.html.twig', 'index.html')
->run();
dev-master
9999999-dev
Allow the processing of templates via robo
Sources
Download
GPL-2.0-or-later
The Requires