10/06
2013
AmCharts Bundle for Symfony2
AmCharts Bundle for Symfony2, (*1)
JavaScript Charts 2.10.1 May, 20 2013, (*2)
``` js // composer.json, (*3)
{ "require": { // ... "lordbaine/am-charts-bundle": "dev-master" } }, (*4)
### Add bundle to your application kernel ``` php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new LordBaine\AmChartsBundle\LordBaineAmChartsBundle(), // ... ); }
``` bash $ php composer.phar update lordbaine/am-charts-bundle, (*5)
### Install assets Given your server's public directory is named "web", install the public vendor resources ``` bash $ php app/console assets:install web
Optionally, use the --symlink attribute to create links rather than copies of the resources, (*6)
``` bash $ php app/console assets:install --symlink web, (*7)
## Usage Refer to the desired files in your HTML template, e.g. ``` html {% javascripts '@LordBaineAmChartsBundle/Resources/public/js/amcharts.js' %} <script type="text/javascript" src="{{ asset_url }}"></script> {% endjavascripts %}
Refer to the source code of the included files for license information, (*8)