symfony API

sfWidgetFormSchemaFormatter Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to API menu

1.2 API OpenSearch


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.

sfWidgetFormSchemaFormatter allows to format a form schema with HTML formats.

Method Summary

Method Details

  • formatErrorRow ($errors) Browse code


  • formatErrorsForRow ($errors) Browse code


  • formatHelp ($help) Browse code


  • formatRow ($label, $field, $errors = array(), $help = '', $hiddenFields = null) Browse code


  • (string) generateLabel ($name, $attributes = array()) Browse code

    $name The field name
    $attributes Optional html attributes for the label tag

    Generates a label for the given field name.

    returns The label tag

  • (string) generateLabelName ($name) Browse code

    $name The field name

    Generates the label name for the given field name.

    returns The label name

  • getDecoratorFormat () Browse code

  • getErrorListFormatInARow () Browse code

  • getErrorRowFormat () Browse code

  • getErrorRowFormatInARow () Browse code

  • getHelpFormat () Browse code

  • getNamedErrorRowFormatInARow () Browse code

  • getRowFormat () Browse code

  • (mixed) getTranslationCallable () Browse code

    Returns the current i18n callable

  • (string) getTranslationCatalogue () Browse code

    Get i18n catalogue name

  • getWidgetSchema () Browse code

  • setDecoratorFormat ($format) Browse code


  • setErrorListFormatInARow ($format) Browse code


  • setErrorRowFormat ($format) Browse code


  • setErrorRowFormatInARow ($format) Browse code


  • setHelpFormat ($format) Browse code


  • setNamedErrorRowFormatInARow ($format) Browse code


  • setRowFormat ($format) Browse code


  • setTranslationCallable ($callable) Browse code


    Sets a callable which aims to translate form labels, errors and help messages

    throws InvalidArgumentException if an invalid php callable or sfCallable has been provided

  • setTranslationCatalogue ($catalogue) Browse code


    Set an i18n catalogue name

    throws InvalidArgumentException when the catalogue is not a string

  • setWidgetSchema ($widgetSchema) Browse code

    $widgetSchema A sfWidgetFormSchema instance

    Sets the widget schema associated with this formatter instance.

  • (string) translate ($subject, $parameters = array()) Browse code

    $subject The subject to translate
    $parameters Additional parameters to pass back to the callable

    Translates a string using an i18n callable, if it has been provided

  • unnestErrors ($errors, $prefix = '') Browse code


  • __construct ($widgetSchema) Browse code