symfony API

AssetHelper Functions

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu


You are currently browsing the symfony API for the 1.4 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.


Function Summary

Function Details

  • (string) auto_discovery_link_tag ($type, $url, $tag_options)

    $type feed type ('rss', 'atom')
    $url 'module/action' or '@rule' of the feed
    $tag_options additional HTML compliant tag parameters

    Returns a <link> tag that browsers and news readers

    can use to auto-detect a RSS or ATOM feed for the current page,
    to be included in the section of a HTML document.

    - rel - defaults to 'alternate'
    - type - defaults to 'application/rss+xml'
    - title - defaults to the feed type in upper case


    echo auto_discovery_link_tag('rss', 'module/feed');
    echo auto_discovery_link_tag('rss', 'module/feed', array('title' => 'My RSS'));

    returns XHTML compliant tag

  • decorate_with ($layout)

    $layout The layout name or path or false to disable the layout

    Decorates the current template with a given layout.

  • (string) dynamic_javascript_include_tag ($uri, $absolute, $options)

    $uri The internal URI for the dynamic javascript
    $absolute Whether to generate an absolute URL
    $options An array of options

    Returns a <script> include tag for the given internal URI.

    The helper automatically adds the sf_format to the internal URI, so you don't have to.

    returns XHTML compliant
    echo javascript_include_tag('common.javascript', '/elsewhere/cools');

    returns XHTML compliant