lendable/twig-bundle

load twig templates from the database

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Maintainers

👁 ppamment

Package info

github.com/Lendable/TwigBundle

Type:symfony-bundle

pkg:composer/lendable/twig-bundle

Statistics

Installs: 19 830

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v2.0.1 2019-12-30 19:24 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 0d04d3e04e89a6dd9b70881a6d69faba21780c0f

  • Lendable Ltd <dev.woop@lendable.co.uk>

databasesymfonytwigbundleLendable

This package is auto-updated.

Last update: 2022-01-22 16:24:01 UTC


README

👁 Scrutinizer Code Quality
👁 Build Status
👁 Coverage Status
👁 Latest Stable Version
👁 Total Downloads

TwigBundle

Symfony bundle that allows Twig templates to be loaded from database store.

Install

composer require lendable/twig-bundle

Require the bundle in your AppKernel.php

<?php

class YourAppKernel extends \Symfony\Component\HttpKernel\Kernel
{
 public function registerBundles(): array
 {
 $bundles = [
 // ...
 new Alpha\TwigBundle\AlphaTwigBundle(),
 ];
 
 return $bundles;
 }
 
 // ...
}

You can use the provided Template entity or use your own. Overwrite the bundle entity with setting paramater values for your entity class alpha_twig.entity.template.class and the directory containing its YAML mapping alpha_twig.entity.template.mapping_dir.

// your-application/app/config/config.yml
parameters:
 alpha_twig.entity.template.class: 'Alpha\TwigBundle\Entity\Template'
 alpha_twig.entity.template.mapping_dir: 'src/Resources/config/doctrine'

License

MIT