Download the PHP package liquidbox/silex-plates without Composer
On this page you can find all versions of the php package liquidbox/silex-plates. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package silex-plates
You are reading the documentation for Silex 2.x. Switch to the documentation for Silex 1.x.
Plates
The PlatesServiceProvider provides integration with the Plates template engine.
Parameters
- plates.directory (optional): The default template directory.
- plates.file_extension (optional): The template file extension.
- plates.folders (optional): A collection of template folders to add for grouping templates under different namespaces.
- plates.data (optional): A collection of data shared with all templates to add.
- plates.functions (optional): A collection of template functions to register.
- plates.extension.asset (optional): The asset extension directory to load that adds the ability to create "cache busted" asset URLs.
Services
- plates: The
Engine
instance. The main way of interacting with Plates. - plates.engine_factory: Factory for
Engine
instances. - plates.loader: The loader for Plates templates which uses the
plates.folders
,plates.data
, andplates.functions
options. - plates.extension_loader.asset: Create new Asset extension instance that adds the ability to create "cache busted" asset URLs.
Registering
Add Plates as a dependency:
Usage
Symfony Components Integration
The PlatesServiceProvider
provides additional integration between some Symfony components and Plates. This will provide you with the following additional capabilities.
Routing Support
If you are using the UrlGeneratorServiceProvider
, you will have access to the path()
and url()
functions. You can find more information in the Symfony Routing documentation.
Security Support
If you are using the SecurityServiceProvider
, you will have access to the is_granted()
function in templates. You can find more information in the Symfony Security documentation.
Customization
You can configure the Plates environment before using it when registering the plates
service:
For more information, check out the official Plates documentation.