Twig for Developers
Learn how to build powerful, smart and flexible templates thanks to the Twig library.
In four days, learn how to generate dynamic templates with Twig modern features, and how to extend and hack the framework to implement your own features set.
Coming sessions
| - | Date | Venue | Price | ||
|---|---|---|---|---|---|
|
Aug. 20 - Aug. 22 | Paris | 1490.00 € | Register | |
|
|||||
|
Oct. 15 - Oct. 17 | Paris | 1490.00 € | Register | |
|
|||||
|
Dec. 26 - Dec. 28 | Paris | 1490.00 € | Register | |
|
|||||
Goals
In four days, you will learn how to leverage the power of the Twig framework thanks to its powerful and flexible architecture and features set.
Program
Download the program as PDFIntroduction to Twig
- Defining a template engine
- Discovering different Twig tags
- Understading how Twig internally works
- Generating a basic « Hello World » application with Twig
- Activating / deactivating auto escaping
Installing and bootstrapping Twig
- Installing Twig from a ZIP archive
- Installing Twig from a Subversion repository
- Installing Twig from a Git repository
- Insalling Twig from a PEAR package
Generating dynamic templates with Twig
- Commenting code with Twig
- Echoing a string or a variable content
- Applying a filter on a variable
- Iterating over an array of an objects collection
- Making conditional statements with control structures
- Using native Twig functions
- Doing some basic arithmetics operations
Refactoring templates with inheritance, inclusion and macros
- Integration multiple levels template inheritance
- Including a template inside a master template
- Splitting a template into several blocks
- Defining a library of macros
- Importing and using macros in templates
Extending and overriding the Twig framework
- Defining and using global variables
- Defining and using custom filters
- Defining and using custom functions
- Defining and using custom tags
- Overriding and overloading Twig internal components with extensions
- Securing compilation with the « sandbox » mode
- Restricting Twig features to ensure security
Session details
Reference code
TWIGC2
Price
Starts at 1490.00 € (ex. tax)
Audience
PHP developers
Duration
4 days (28 hours)
Training type
Workshop
Topics
Template engine
Pre-requisites
Mastering PHP and Object Oriented Programming
For further information
+33 140 998 205
We remain at your disposal for further information.
