Onsite training

Bring our trainers team onsite to train your employees.

Learn more


PHP & MySQL

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  
French Aug. 20 - Aug. 22 Paris 1490.00 € Register
  • This session will take place from August 20, 2012 at 9:00 AM to August 22, 2012 at 5:30 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

French Oct. 15 - Oct. 17 Paris 1490.00 € Register
  • This session will take place from October 15, 2012 at 9:00 AM to October 17, 2012 at 5:30 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

French Dec. 26 - Dec. 28 Paris 1490.00 € Register
  • This session will take place from December 26, 2012 at 9:00 AM to December 28, 2012 at 5:30 PM (Europe/Paris) and it will be hosted by Hugo Hamon.


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 PDF

Introduction 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.

Contact us