Welcome to DifaneTwigDatabaseBundle’s documentation!¶
Installation¶
Add bundle requirement to composer.json
"require": {
...
"difane/difane-twig-database-bundle": "dev-master",
...
}
Run composer to download library and it’s dependencies
php composer.phar update
Register the bundle in app/AppKernel.php:
<?php
$bundles = array(
// ...
new Difane\Bundle\TwigDatabaseBundle\DifaneTwigDatabaseBundle(),
);
Configuration¶
Configuration options
- difane_twig_database
table_name : Table name for storing templates
auto_create_templates : Set to true if You want to automatically create referenced templates that are not exists
- sonata_admin
- enabled : Set to true if You want to enable Sonata-Admin integration
- group : Sonata-Admin group name
- label : Sonata-Admin label name
Full Configuration Options¶
difane_twig_database:
table_name: "MyTwigTable" # Default is 'difane_twig_database_template'
auto_create_templates: true # Default is false
sonata_admin:
enabled: true # Default is true
group: "This is my group" # Default is 'Twig'
label: "Twig Templates from bundle" # Default is 'Templates'