symfony API

TagHelper Functions

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

TagHelper defines some base helpers to construct html tags.

Function Summary

Function Details

  • cdata_section () Browse code

  • (string) comment_as_conditional ($condition, $content) Browse code

    Wraps the content in conditional comments.

  • content_tag () Browse code

  • escape_javascript () Browse code

    Escape carrier returns and single and double quotes for Javascript segments.

  • (string) escape_once ($html) Browse code

    $html HTML string to escape

    Escapes an HTML string.

    returns escaped string

  • (string) fix_double_escape ($escaped) Browse code

    $escaped HTML string to fix

    Fixes double escaped strings.

    returns fixed escaped string

  • (string) get_id_from_name ($name, $value) Browse code

    $name field name
    $value field value

    Returns a formatted ID based on the <i>$name</i> parameter and optionally the <i>$value</i> parameter.


    This function determines the proper form field ID name based on the parameters. If a form field has an
    array value as a name we need to convert them to proper and unique IDs like so:

    name[] => name (if value == null)
    name[] => name_value (if value != null)
    name[bob] => name_bob
    name[item][total] => name_item_total

    Examples:

    echo get_id_from_name('status[]', '1');

    returns

    $name tag name
    $options tag options
    $open true to leave tag open

    Constructs an html tag.

  • (array) _convert_options ($options) Browse code

    Converts specific <i>$options</i> to their correct HTML format

    returns returns properly formatted options

  • _get_option () Browse code

  • _parse_attributes () Browse code

  • _tag_options () Browse code