使用Symfony2 assetic来管理images,js和css以外的资产

Use Symfony2 assetic for managing assets other than images, js and css. Other assets such as swf, fonts etc or to be generic is there any generic option that can be used with assetic to use just about any type of file...file.xxx

For images it's :

{% image '@mybundlename/Resources/public/images/sample.png' %}
<img src="{{ assets_url }}" />
{% endimage %}

For stylesheets it's :

{% stylesheets ......

For javascripts it's :

{% javascripts..... }

So like wise what about other types of files.

You can use twigs asset function

<img src="{{ asset('images/logo.png') }}" alt="Symfony!" />

<link href="{{ asset('css/blog.css') }}" rel="stylesheet" type="text/css" />

http://symfony.com/doc/2.3/book/templating.html#linking-to-assets

I think, that you can try

{% image '@mybundlename/Resources/some/some.swf' %}
    <object type="application/x-shockwave-flash" data="{{ assets_url }}" /> 
{% endimage %}

But, if yours file located in the Resources/public/*, i.e. /ExampleBundle/Resources/public/flash/some.swf - use:

<object type="application/x-shockwave-flash" data="{{ asset('bundles/example/flash/some.swf') }}" />