2017 © Pedro Peláez
 

symfony-bundle mustache-bundle

Symfony Mustache.php Bundle

image

bobthecow/mustache-bundle

Symfony Mustache.php Bundle

  • Sunday, February 14, 2016
  • by bobthecow
  • Repository
  • 2 Watchers
  • 15 Stars
  • 13,321 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 4 Open issues
  • 3 Versions
  • 18 % Grown

The README.md

MustacheBundle

A Symfony implementation of the Mustache template rendering. This will add Mustache as a renderer in Symfony, (*1)

1) Installing

Composer

Just run following command with composer:, (*2)

composer.phar require bobthecow/mustache-bundle

Lookup desired version constraint from packagist. After adding this run, (*3)

composer.phar update

AppKernel

To actually download and use this bundle. Also add following line to your AppKernel.php, (*4)

new Bobthecow\Bundle\MustacheBundle\BobthecowMustacheBundle()

config.yml

Add rendererer to your config.yml, (*5)

framework:
    templating:
        engines: ['twig', 'mustache']

2) Using it

Like you would use twig. Just put your mustache file in your Resources\views folder using .mustache as extension. E.g., (*6)

    // Render Mustache template and return response
    return $this->render('AcmeDemoBundle:Hello:index.html.mustache');

Or pass along the template in the Template() annotation, (*7)

    /**
     * @Template("AcmeDemoBundle:Hello:index.html.mustache")
     */
     public function indexAction()
     {
         return array();
     }

The Versions

14/02 2016

dev-master

9999999-dev http://github.com/bobthecow/BobthecowMustacheBundle

Symfony Mustache.php Bundle

  Sources   Download

MIT

The Requires

 

templating symfony2 sf2 symfony mustache

10/07 2014

v1.2.0

1.2.0.0 http://github.com/bobthecow/BobthecowMustacheBundle

Symfony Mustache.php Bundle

  Sources   Download

MIT

The Requires

 

templating symfony2 sf2 symfony mustache

31/03 2014

v1.1.0

1.1.0.0 http://github.com/bobthecow/BobthecowMustacheBundle

Symfony Mustache.php Bundle

  Sources   Download

MIT

The Requires

 

templating symfony2 sf2 symfony mustache