2.0-wip is getting out of hand, and future work will be done in features to try to break up the work better.
2.0 is still experimental, but the basic goals of this update are functional. The new version does not currently support existing .ctp views very gracefully, but new projects or even plugins that configure Twig as the view class will benefit from new syntax {% extends 'App:Layouts:default.html.twig' %}
Basic Features
New View::render() syntax that matches Symfony2
PHP 5.3+ only (this is a feature :)
Composer support for vendors
Autoloading via composer
TwigPlugin library
TemplateNameParser - parses string representing a view path and converts it into a TemplateReference
TemplateReference
FilesystemLoader - Custom twig file system loader to parse and locate templates.
Template path caching via plugin console command
Controllers can call render like so:
return $this->render(':Articles:index.xml.twig'); // In this case, you could do App:Articles:index.xml.twig too.
Finish out Extension base API (HtmlHelper/FormHelper)
Provide a hook for other areas of the app to provide Extensions.
Provide installation instructions
Finish Readme and docs
Testing
Notes
I am still fleshing out the view layer API - really want to bring more consistency than raw helper classes provide.
The plugin's Cake shell is not located ATM, so symlinking to app/Console/Command is required.
This has been developed mostly in a CakePHP 2.0 environment and testing within the >= 2.1.0 is still needed.
Console for warming up template paths is very clunky ATM.
Extra checking of App paths is needed because Twig throws an exception if you configure a non-existent path.
2.0-wip is getting out of hand, and future work will be done in features to try to break up the work better.
2.0 is still experimental, but the basic goals of this update are functional. The new version does not currently support existing
.ctp
views very gracefully, but new projects or even plugins that configure Twig as the view class will benefit from new syntax{% extends 'App:Layouts:default.html.twig' %}
Basic Features
Controllers can call render like so:
Or a plugin:
Todo
Finish out Extension base API (HtmlHelper/FormHelper)Provide a hook for other areas of the app to provide Extensions.Provide installation instructionsNotes
I am still fleshing out the view layer API - really want to bring more consistency than raw helper classes provide. The plugin's Cake shell is not located ATM, so symlinking to app/Console/Command is required. This has been developed mostly in a CakePHP 2.0 environment and testing within the >= 2.1.0 is still needed. Console for warming up template paths is very clunky ATM. Extra checking of App paths is needed because Twig throws an exception if you configure a non-existent path.