symfony API

sfFormFieldSchema Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

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

sfFormFieldSchema represents an array of widgets bind to names and values.

Inheritence

sfFormFieldSchema  <  sfFormField

Method Summary

  • integer count()
    Returns the number of form fields (implements the Countable interface).
  • mixed current()
    Returns the current form field (implements the Iterator interface).
  • array getHiddenFields($recursive)
    Returns an array of hidden fields from the current schema.
  • string key()
    Gets the key associated with the current form field (implements the Iterator interface).
  • next()
    Moves to the next form field (implements the Iterator interface).
  • Boolean offsetExists($name)
    Returns true if the bound field exists (implements the ArrayAccess interface).
  • sfFormField offsetGet($name)
    Returns the form field associated with the name (implements the ArrayAccess interface).
  • offsetSet($offset, $value)
    Throws an exception saying that values cannot be set (implements the ArrayAccess interface).
  • offsetUnset($offset)
    Throws an exception saying that values cannot be unset (implements the ArrayAccess interface).
  • string renderHiddenFields($recursive)
    Renders hidden form fields.
  • rewind()
    Resets the field names array to the beginning (implements the Iterator interface).
  • boolean valid()
    Returns true if the current form field is valid (implements the Iterator interface).
  • __construct($widget, $parent, $name, $value, $error)
    Constructor.

Methods inherited from sfFormField

getError , getName , getParent , getToStringException , getValue , getWidget , hasError , hasToStringException , isHidden , render , renderError , renderHelp , renderId , renderLabel , renderLabelName , renderName , renderRow , setToStringException , __construct , __toString

Method Details

  • (integer) count () Browse code

    Returns the number of form fields (implements the Countable interface).

    returns The number of embedded form fields

  • (mixed) current () Browse code

    Returns the current form field (implements the Iterator interface).

    returns The escaped value

  • (array) getHiddenFields ($recursive) Browse code

    $recursive Whether to recur through embedded schemas

    Returns an array of hidden fields from the current schema.

  • (string) key () Browse code

    Gets the key associated with the current form field (implements the Iterator interface).

    returns The key

  • next () Browse code

    Moves to the next form field (implements the Iterator interface).

  • (Boolean) offsetExists ($name) Browse code

    $name The name of the bound field

    Returns true if the bound field exists (implements the ArrayAccess interface).

    returns true if the widget exists, false otherwise

  • (sfFormField) offsetGet ($name) Browse code

    $name The offset of the value to get

    Returns the form field associated with the name (implements the ArrayAccess interface).

    returns A form field instance

  • offsetSet ($offset, $value) Browse code

    $offset (ignored)
    $value (ignored)

    Throws an exception saying that values cannot be set (implements the ArrayAccess interface).

    throws LogicException

  • offsetUnset ($offset) Browse code

    $offset (ignored)

    Throws an exception saying that values cannot be unset (implements the ArrayAccess interface).

    throws LogicException

  • (string) renderHiddenFields ($recursive) Browse code

    $recursive False will prevent hidden fields from embedded forms from rendering

    Renders hidden form fields.

  • rewind () Browse code

    Resets the field names array to the beginning (implements the Iterator interface).

  • (boolean) valid () Browse code

    Returns true if the current form field is valid (implements the Iterator interface).

    returns The validity of the current element; true if it is valid

  • __construct ($widget, $parent, $name, $value, $error) Browse code

    $widget A sfWidget instance
    $parent The sfFormField parent instance (null for the root widget)
    $name The field name
    $value The field value
    $error A sfValidatorError instance

    Constructor.