PHPonTrax
[ class tree: PHPonTrax ] [ index: PHPonTrax ] [ all elements ]

Class: FormHelper

Source Location: /vendor/trax/action_view/helpers/form_helper.php

Class Overview

Helpers
   |
   --FormHelper



Author(s):

Variables

Methods


Child classes:

Inherited Variables

Inherited Methods

Class: Helpers

Helpers::__construct()
Construct a Helpers object
Helpers::boolean_attribute()
Convert an attribute to proper XML boolean form
Helpers::cdata_section()
Wrap CDATA begin and end tags around argument
Helpers::content_tag()
Generate an open/close pair of tags with optional attributes and content between
Helpers::convert_options()
Convert selected attributes to proper XML boolean form
Helpers::object()
Given the name of an ActiveRecord subclass, find an instance
Helpers::tag()
Generate an HTML or XML tag with optional attributes and self-ending
Helpers::tag_options()
Convert array of tag attribute names and values to string
Helpers::to_content_tag()
Helpers::value()
Get value of current attribute in the current ActiveRecord object

Class Details

[line 34]


Tags:

todo:  Document this class


[ Top ]


Class Variables

$default_date_options = array()

[line 58]

Default attributes for dates



Tags:

usedby:  FormHelper::__construct()
access:  private

Type:   string[]


[ Top ]

$default_field_options = array()

[line 40]

Default attributes for input fields



Tags:

usedby:  FormHelper::to_input_field_tag()
usedby:  FormHelper::__construct()
access:  private

Type:   string[]


[ Top ]

$default_radio_options = array()

[line 46]

Default attributes for radio buttons



Tags:

usedby:  FormHelper::__construct()
access:  private

Type:   string[]


[ Top ]

$default_text_area_options = array()

[line 52]

Default attributes for text areas



Tags:

usedby:  FormHelper::__construct()
access:  private

Type:   string[]


[ Top ]



Class Methods


constructor __construct [line 67]

FormHelper __construct( mixed $object_name, mixed $attribute_name)



Tags:



Overrides Helpers::__construct() (Construct a Helpers object)

[ Top ]

method add_default_name_and_id [line 132]

void add_default_name_and_id( string[] $options)



Tags:



Parameters:

string[]   $options  

[ Top ]

method error_wrapping [line 304]

string error_wrapping( string $html_tag, boolean $has_error)

If this tag has an error, wrap it with a visual indicator



Tags:



Parameters:

string   $html_tag   HTML to be wrapped
boolean   $has_error   true=>error, false=>no error

[ Top ]

method tag_id [line 112]

void tag_id( )



Tags:

usedby:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method tag_id_with_index [line 119]

void tag_id_with_index( mixed $index)



Tags:

usedby:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method tag_name [line 98]

void tag_name( )



Tags:

usedby:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method tag_name_with_index [line 105]

void tag_name_with_index( mixed $index)



Tags:

usedby:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method to_boolean_select_tag [line 278]

void to_boolean_select_tag( [mixed $options = array()])



Tags:

usedby:  boolean_select()
usedby:  ActiveRecordHelper::to_tag()
uses:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method to_check_box_tag [line 244]

void to_check_box_tag( [mixed $options = array()], [mixed $checked_value = "1"], [mixed $unchecked_value = "0"])



Tags:

usedby:  check_box()
uses:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method to_input_field_tag [line 178]

string to_input_field_tag( string $field_type, [string[] $options = array()])

Generate an HTML or XML input tag with optional attributes



Tags:

return:  <input type="type " maxlength="maxlength" .../>\n
usedby:  text_field()
usedby:  ActiveRecordHelper::to_tag()
usedby:  password_field()
usedby:  hidden_field()
usedby:  file_field()
uses:  Helpers::value()
uses:  Helpers::tag()
uses:  Helpers::$attribute_name
uses:  FormHelper::error_wrapping()
uses:  FormHelper::$default_field_options
uses:  Helpers::object()
uses:  FormHelper::add_default_name_and_id()


Parameters:

string   $field_type   Type of input field ('text', 'password', 'hidden' etc.)
string[]   $options   Attributes to apply to the input tag:
array('attr1' => 'value1'[, 'attr2' => 'value2']...)

[ Top ]

method to_radio_button_tag [line 204]

void to_radio_button_tag( mixed $tag_value, [mixed $options = array()])



Tags:

usedby:  radio_button()
uses:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]

method to_text_area_tag [line 223]

void to_text_area_tag( [mixed $options = array()])



Tags:

usedby:  text_area()
usedby:  ActiveRecordHelper::to_tag()
uses:  FormHelper::add_default_name_and_id()
todo:  Document this method


[ Top ]


Documentation generated on Thu, 04 May 2006 19:47:41 -0600 by phpDocumentor 1.3.0RC4