2017 © Pedro Peláez
 

symfony-bundle turbolinks-bundle

Turbolinks bundle for Symfony2

image

helthe/turbolinks-bundle

Turbolinks bundle for Symfony2

  • Thursday, March 9, 2017
  • by carlalexander
  • Repository
  • 2 Watchers
  • 34 Stars
  • 56,945 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 2 Open issues
  • 5 Versions
  • 4 % Grown

The README.md

Helthe Turbolinks Bundle Build Status Scrutinizer Quality Score

The HeltheTurbolinksBundle integrates the Helthe Turbolinks Component with your Symfony application., (*1)

Installation

Step 1: Add package requirement in Composer

Manually

Add the following in your composer.json:, (*2)

{
    "require": {
        // ...
        "helthe/turbolinks-bundle": "~1.3"
    }
}

Using the command line

$ composer require 'helthe/turbolinks-bundle=~1.3'

Step 2: Register the bundle in the kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Helthe\Bundle\TurbolinksBundle\HeltheTurbolinksBundle(),
    );
}

Step 3: Add Composer scripts for automatic installation of assets

{
   "scripts": {
       "post-install-cmd": [
           "Helthe\\Bundle\\TurbolinksBundle\\Composer\\ScriptHandler::installAssets"
       ],
       "post-update-cmd": [
           "Helthe\\Bundle\\TurbolinksBundle\\Composer\\ScriptHandler::installAssets"
       ]
   }
}

Usage

To start using turbolinks, all you need to do is add the turbolinks javascript to your layout., (*3)

Both the original coffeescript version and compiled version of each script are available for use., (*4)

Inserting the javascript in your layout

Directly

<script src="{{ asset('bundles/heltheturbolinks/js/turbolinks.js') }}"></script>

Using Assetic

{% javascripts '@HeltheTurbolinksBundle/Resources/public/js/turbolinks.js' %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}

If you need to use jquery.turbolinks, you need to add it before turbolinks.js, (*5)

Compatibility

Turbolinks is designed to work with any browser that fully supports pushState and all the related APIs. This includes Safari 6.0+ (but not Safari 5.1.x!), IE10, and latest Chromes and Firefoxes., (*6)

Do note that existing JavaScript libraries may not all be compatible with Turbolinks out of the box due to the change in instantiation cycle. You might very well have to modify them to work with Turbolinks' new set of events. For help with this, check out the Turbolinks Compatibility project., (*7)

Additional Resources

Please refer to the turbolinks and jquery.turbolinks projects if you require additional information on the javascript libraries., (*8)

You will find additional documentation with the turbolinks component documentation., (*9)

Bugs

For bugs or feature requests, please create an issue., (*10)

The Versions

09/03 2017

dev-master

9999999-dev https://helthe.co

Turbolinks bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Carl Alexander

turbolinks jquery.turbolinks

03/06 2016

1.2.0

1.2.0.0 https://helthe.co

Turbolinks bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Carl Alexander

turbolinks jquery.turbolinks

30/01 2014

1.1.1

1.1.1.0 https://helthe.co

Turbolinks bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Carl Alexander

turbolinks jquery.turbolinks

30/01 2014

1.1.0

1.1.0.0 https://helthe.co

Turbolinks bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Carl Alexander

turbolinks jquery.turbolinks

25/12 2013

1.0.0

1.0.0.0 https://helthe.co

Turbolinks bundle for Symfony2

  Sources   Download

MIT

The Requires

 

by Carl Alexander

turbolinks jquery.turbolinks