symfony API

TagHelper Functions

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.2 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 ($content) Browse code

    $content

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

    $condition
    $content

    Wraps the content in conditional comments.

  • content_tag ($name, $content = '', $options = array()) Browse code

    $name
    $content
    $options

  • escape_javascript ($javascript = '') Browse code

    $javascript

    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 = null) Browse code

    $name field name
    $value field value

    Returns a formatted ID based on the parameter and optionally the 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 <select> tag populated with all the languages in the world.

  • (string) tag ($name, $options = array(), $open = false) Browse code

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

    Constructs an html tag.

  • (array) _convert_options ($options) Browse code

    $options

    Converts specific to their correct HTML format

    returns returns properly formatted options

  • _get_option (&$options, $name, $default = null) Browse code

    &$options
    $name
    $default

  • _parse_attributes ($string) Browse code

    $string

  • _tag_options ($options = array()) Browse code

    $options