symfony API

sfFormFieldSchema Class

« Back to API menu

Packages

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

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

Inheritence

sfFormFieldSchema  <  sfFormField

Method Summary

  • __construct($widget, $parent = null, $name, $value, $error = null)
    Constructor.
  • integer count()
    Returns the number of form fields (implements the Countable interface).
  • boolean valid()
    Returns true if the current form field is valid (implements the Iterator interface).
  • offsetGet($name)
    Returns the form field associated with the name (implements the ArrayAccess 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).
  • rewind()
    Resets the field names array to the beginning (implements the Iterator interface).
  • offsetSet($offset, $value)
    Throws an exception saying that values cannot be set (implements the ArrayAccess interface).
  • string key()
    Gets the key associated with the current form field (implements the Iterator interface).
  • offsetUnset($offset)
    Throws an exception saying that values cannot be unset (implements the ArrayAccess interface).
  • mixed current()
    Returns the current form field (implements the Iterator interface).

Methods inherited from sfFormField

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

Method Details

  • __construct ($widget, $parent = null, $name, $value, $error = null)

    $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.

  • (integer) count ()

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

    returns The number of embedded form fields

  • (boolean) valid ()

    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

  • offsetGet ($name)

    $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

  • next ()

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

  • (Boolean) offsetExists ($name)

    $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

  • rewind ()

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

  • offsetSet ($offset, $value)

    $offset (ignored)
    $value (ignored)

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

    throws LogicException

  • (string) key ()

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

    returns The key

  • offsetUnset ($offset)

    $offset (ignored)

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

    throws LogicException

  • (mixed) current ()

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

    returns The escaped value