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::error_wrapping()
If this tag has an error, wrap it with a visual indicator
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:

access:  private
usedby:  FormHelper::__construct()

Type:   string[]


[ Top ]

$default_field_options = array()

[line 40]

Default attributes for input fields



Tags:

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

Type:   string[]


[ Top ]

$default_radio_options = array()

[line 46]

Default attributes for radio buttons



Tags:

access:  private
usedby:  FormHelper::__construct()

Type:   string[]


[ Top ]

$default_text_area_options = array()

[line 52]

Default attributes for text areas



Tags:

access:  private
usedby:  FormHelper::__construct()

Type:   string[]


[ Top ]



Class Methods


constructor __construct [line 67]

FormHelper __construct( $object_name, $attribute_name)



Tags:



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

Parameters:

   $object_name  
   $attribute_name  

[ Top ]

method add_default_name_and_id [line 132]

void add_default_name_and_id( string[] $options)



Tags:



Parameters:

string[]   $options  

[ Top ]

method tag_id [line 112]

void tag_id( )



Tags:

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


[ Top ]

method tag_id_with_index [line 119]

void tag_id_with_index( $index)



Tags:

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


Parameters:

   $index  

[ Top ]

method tag_name [line 98]

void tag_name( )



Tags:

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


[ Top ]

method tag_name_with_index [line 105]

void tag_name_with_index( $index)



Tags:

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


Parameters:

   $index  

[ Top ]

method to_boolean_select_tag [line 282]

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



Tags:

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


Parameters:

   $options  

[ Top ]

method to_check_box_tag [line 248]

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



Tags:

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


Parameters:

   $options  
   $checked_value  
   $unchecked_value  

[ Top ]

method to_input_field_tag [line 182]

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::$default_field_options
uses:  Helpers::error_wrapping()
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 208]

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



Tags:

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


Parameters:

   $tag_value  
   $options  

[ Top ]

method to_text_area_tag [line 227]

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



Tags:

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


Parameters:

   $options  

[ Top ]


Documentation generated on Mon, 21 May 2007 22:28:31 -0600 by phpDocumentor 1.3.2