symfony API

TagHelper Functions

« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 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.

TagHelper defines some base helpers to construct html tags.

Function Summary

Function Details

  • cdata_section () Browse code

  • 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

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.