Ejemplo n.º 1
0
 /**
  * 
  * Creates and returns a QuickForm object based on table columns.
  *
  * @access public
  *
  * @param array $columns A sequential array of column names to use in
  * the form; if null, uses all columns.
  *
  * @param string $array_name By default, the form will use the names
  * of the columns as the names of the form elements.  If you pass
  * $array_name, the column names will become keys in an array named
  * for this parameter.
  * 
  * @param array $args An associative array of optional arguments to
  * pass to the QuickForm object.  The keys are...
  *
  * 'formName' : String, name of the form; defaults to the name of this
  * table.
  * 
  * 'method' : String, form method; defaults to 'post'.
  * 
  * 'action' : String, form action; defaults to
  * $_SERVER['REQUEST_URI'].
  * 
  * 'target' : String, form target target; defaults to '_self'
  * 
  * 'attributes' : Associative array, extra attributes for <form>
  * tag; the key is the attribute name and the value is attribute
  * value.
  * 
  * 'trackSubmit' : Boolean, whether to track if the form was
  * submitted by adding a special hidden field
  * 
  * @param string $clientValidate By default, validation will match
  * the 'qf_client' value from the column definition.  However,
  * if you set $clientValidate to true or false, this will
  * override the value from the column definition.
  *
  * @param array $formFilters An array with filter function names or
  * callbacks that will be applied to all form elements.
  *
  * @return object HTML_QuickForm
  * 
  * @see HTML_QuickForm
  * 
  * @see DB_Table_QuickForm
  * 
  */
 function &getForm($columns = null, $array_name = null, $args = array(), $clientValidate = null, $formFilters = null)
 {
     include_once 'DB/Table/QuickForm.php';
     $coldefs = $this->_getFormColDefs($columns);
     $form =& DB_Table_QuickForm::getForm($coldefs, $array_name, $args, $clientValidate, $formFilters);
     return $form;
 }