Class PhpgaclHtmlHelper

Description

Html Helper class for easy use of HTML widgets.

HtmlHelper encloses all methods needed while working with HTML pages.

  • author: Mariano Iglesias

Located in /plugins/phpgacl/views/helpers/phpgacl_html.php (line 26)

HtmlHelper
   |
   --PhpgaclHtmlHelper
Method Summary
mixed appendableCheckbox (string $fieldName, [array $htmlAttributes = array()], [boolean $return = false])
mixed generateThreadedCheckBoxes (string $field,  &$thread, [string $fieldChildren = 'children'], [string $fieldValue = 'value'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
mixed generateThreadedLinks (array $model, string $url,  &$thread, [string $fieldChildren = 'children'], [string $fieldValue = 'value'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
mixed generateThreadedList (string $field,  &$thread, [mixed $selected = null], [array $selectAttr = array()], [array $optionAttr = null], [boolean $showEmpty = true], [string $fieldChildren = 'children'], [string $fieldValue = 'id'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
Methods
appendableCheckbox (line 40)

Get the tag for a checkbox which value should be appendable (ie: where the name ends with []).

  • return: Either string or boolean value, depends on AUTO_OUTPUT and $return.
  • since: 1.0
  • access: public
mixed appendableCheckbox (string $fieldName, [array $htmlAttributes = array()], [boolean $return = false])
  • string $fieldName: The field name that will hold each checkbox (it appends [] to it to make it an array)
  • array $htmlAttributes: HTML attributes for the element.
  • boolean $return: Wheter this method should return a value or output it.
generateThreadedCheckBoxes (line 65)

Get a tree of checkboxes for a threaded list.

  • return: Either string or boolean value, depends on AUTO_OUTPUT and $return.
  • since: 1.0
  • access: public
mixed generateThreadedCheckBoxes (string $field,  &$thread, [string $fieldChildren = 'children'], [string $fieldValue = 'value'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
  • string $field: Name attribute of the SELECT
  • array $thread: The threaded array as return by Model->findAllThreaded()
  • string $fieldChildren: The index where the children can be found
  • string $fieldValue: The index where the value can be found
  • string $fieldName: The index where the name can be found
  • boolean $return: Whether this method should return a value
  • &$thread
generateThreadedLinks (line 90)

Get a tree of links for a threaded list.

  • return: Either string or boolean value, depends on AUTO_OUTPUT and $return.
  • since: 1.0
  • access: public
mixed generateThreadedLinks (array $model, string $url,  &$thread, [string $fieldChildren = 'children'], [string $fieldValue = 'value'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
  • array $model: Model returned by findAllThreaded()
  • string $url: URL that will be generated (where the string ${VALUE} will be replaced with the value of the record)
  • array $thread: The threaded array as return by Model->findAllThreaded()
  • string $fieldChildren: The index where the children can be found
  • string $fieldValue: The index where the value can be found
  • string $fieldName: The index where the name can be found
  • boolean $return: Whether this method should return a value
  • &$thread
generateThreadedList (line 116)

Get the SELECT tag for a threaded list.

  • return: Either string or boolean value, depends on AUTO_OUTPUT and $return.
  • since: 1.0
  • access: public
mixed generateThreadedList (string $field,  &$thread, [mixed $selected = null], [array $selectAttr = array()], [array $optionAttr = null], [boolean $showEmpty = true], [string $fieldChildren = 'children'], [string $fieldValue = 'id'], [string $fieldName = 'name'], [boolean $return = false], array $thread)
  • string $field: Name attribute of the SELECT
  • array $thread: The threaded array as return by Model->findAllThreaded()
  • mixed $selected: Selected option
  • array $selectAttr: Array of HTML options for the opening SELECT element
  • array $optionAttr: Array of HTML options for the enclosed OPTION elements
  • boolean $showEmpty: If true, the empty select option is shown
  • string $fieldChildren: The index where the children can be found
  • string $fieldValue: The index where the value can be found
  • string $fieldName: The index where the name can be found
  • boolean $return: Whether this method should return a value
  • &$thread

Documentation generated on Thu, 08 Mar 2007 21:52:52 -0300 by phpDocumentor 1.3.1