2017 © Pedro Peláez
 

symfony-bundle polymer-bundle

Symfony bundle and Twig extension for developing and deploying Polymer web components.

image

headzoo/polymer-bundle

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  • Monday, June 15, 2015
  • by headzoo
  • Repository
  • 5 Watchers
  • 11 Stars
  • 78 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 4 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Polyphonic Polymer Bundle

Symfony bundle and Twig extension for developing and deploying Polymer web components., (*1)

Build Status Documentation MIT License, (*2)

Polyphonic Symfony, (*3)

This bundle is no where near production ready. Use at your own risk., (*4)

The purpose of this bundle is making it easier to use and build Polymer web components within a Symfony project. Polyphonic handles the problems that come up when trying to build and use web components within Twig templates., (*5)

Example Element

A simple example of using the {% polymer element %} Twig tag to create a custom <hello-world><hello-world> element. This element displays "Hello, World!" by default, but the message can be changed by setting the name attribute., (*6)

Note that there's no need to add <link rel="import" href="polymer/polymer.html"> as the import statement is added automatically. The template is saved in the bundle directory at Resources/public/elements/hello-world/hello-world.html.twig., (*7)

{% polymer element "hello-world" attributes="name" %}
    <template>
        <p>Hello, {{name}}!</p>
    </template>
    <script>
        Polymer({
            name: "World"
        });
    </script>
{% endpolymer %}

Using the element in your views:, (*8)

{% polymer import "@AcmeBundle:hello-world/hello-world.html.twig" %}


<hello-world></hello-world>


<hello-world name="Pascal"></hello-world>

Requirements

PHP 5.5.*
Symfony 2.6.*, (*9)

Installing

Add headzoo/polymer-bundle to your composer.json requirements., (*10)

"require": {
    "headzoo/polymer-bundle": "0.0.3"
}

Run composer update and then add the bundle your AppKernel.php., (*11)

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
            new Symfony\Bundle\SecurityBundle\SecurityBundle(),
            ...
            new Headzoo\Bundle\PolymerBundle\PolymerBundle(),
        )

        return $bundles;
    }
}

Add the following route to your app/config/routing_dev.yml file., (*12)

polymer:
    resource: "@PolymerBundle/Resources/config/routing.yml"
    prefix:   /_polymer

Next: Read the full documentation, (*13)

The Versions

15/06 2015

dev-master

9999999-dev http://www.polyphonic-symfony.org

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

15/06 2015

dev-dev

dev-dev http://www.polyphonic-symfony.org

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

15/06 2015

dev-polymer_1

dev-polymer_1 http://www.polyphonic-symfony.org

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

15/06 2015

0.0.5.1

0.0.5.1 http://www.polyphonic-symfony.org

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

04/05 2015

0.0.5

0.0.5.0 http://www.polyphonic-symfony.org

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

04/05 2015

0.0.4

0.0.4.0 http://www.polyphonic-symfony.org

Symfony bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

04/05 2015

0.0.3

0.0.3.0 https://github.com/headzoo/polymer-bundle

Symfony framework bundle and Twig extension for developing and deploying Polymer web components.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

03/05 2015

0.0.2

0.0.2.0 https://github.com/headzoo/polyphonic-symfony

Polymer bundle for Twig templating engine and the Symfony framework.

  Sources   Download

MIT

The Requires

 

twig javascript symfony polymer web components

03/05 2015

0.0.1

0.0.1.0 https://github.com/headzoo/polyphonic

Polymer Project bundle for the Symfony2 framework.

  Sources   Download

MIT

The Requires

 

symfony polymer web components