2017 © Pedro Peláez
 

symfony-bundle timelinejs-bundle

TimelineJS bundle for Symfony2

image

chub/timelinejs-bundle

TimelineJS bundle for Symfony2

  • Saturday, March 16, 2013
  • by Chub
  • Repository
  • 3 Watchers
  • 6 Stars
  • 13 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

TimelineJSBundle

TimelineJS Symfony2 bundle. Provides easy integration of TimelineJS., (*1)

Build Status, (*2)

knp, (*3)

About TimelineJS

There are lots of timeline tools on the web but they are almost all either hard on the eyes or hard to use. Create timelines that are at the same time beautiful and intuitive for users., (*4)

Installation

Download bundle

First of all, download bundle using one of common ways:, (*5)

Using deps file

Add the following lines to your deps file and run php bin/vendors install, (*6)

[TimelineJSBundle]
    git=https://github.com/ChubV/TimelineJSBundle.git
    target=bundles/ChubProduction/TimelineJSBundle

Using composer

Register the namespaces

Add the following namespace entry to the registerNamespaces call in your autoloader:, (*7)

``` php <?php // app/autoload.php $loader->registerNamespaces(array( // ... 'ChubProduction\TimelineJSBundle' => DIR.'/../vendor/bundles', // ... ));, (*8)


This is unnecessary step if you use Composer's automaticaly generated autoload file ### Register the bundle To start using the bundle, register it in your Kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new ChubProduction\TimelineJSBundle\TimelineJSBundle(), ); // ... }

Create your first Timeline

Create an entity that implements TimelineEntityInterface

``` php <?php // TimelineEntity.php // ... class TimelineEntity implements TimelineEntityInterface { // ... }, (*9)


#### Fetch an array of your entities Array will represent the points on your Timeline. Create timeline and pass it to your view. ``` php <?php // TimelineController.php // ... /** * @Route("/timeline", name="_timeline") * @Template() */ public function timelineAction() { $ts = $this->get('timelinejs'); $timeline = $ts->createTimeline('myTimeline', $this->fetchTimelineEntities()); return compact('timeline'); }

Render timeline in your template, (*10)

twig {# timeline.html.twig #} {% import "TimelineJSBundle::macro.html.twig" as t %} {{ t.head() }} <div id="timeline"></div> {{ t.show(timeline, {'embed_id': 'timeline', 'debug': true}) }}, (*11)

The Versions

16/03 2013

dev-master

9999999-dev https://github.com/ChubV/TimelineJSBundle

TimelineJS bundle for Symfony2

  Sources   Download

The Requires

 

timeline js bundle

13/11 2012

2.1.x-dev

2.1.9999999.9999999-dev https://github.com/ChubV/TimelineJSBundle

TimelineJS bundle for Symfony2

  Sources   Download

The Requires

 

timeline js bundle