In your bundle’s boot() method, for example:
public function boot()
{
$am = $this->container->get(‘assetic.asset_manager’);
// create the asset...
$am->set(‘main_js’, $asset);
}
In your template:
{% javascripts ‘@main_js’ %}...{% endjavascripts %}
Make sense?
On Friday, June 3, 2011 at 5:59 AM, Mario Alberto Alvarez Garcia wrote:
> @Kris, @stof, thanks for so fast answers!
>
> @Kris, I have no idea how can I do what you say, can you put an example, or
> at least give me a clue?
> Thank you very much.
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com (http://symfony-project.com)
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> (mailto:[email protected])
> To unsubscribe from this group, send email to
> [email protected]
> (mailto:[email protected])
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en