Class DBLConditionField

Description

Can be used to add custom (arbitrary) condition(s) to the filter.

This field is to be used only in filter. You can set arbitrary number of conditions in an associative array (name => condition). The condition array specifies the behaviour of the field:

Keys:

  • When the field contains two integer indices (0 and 1), the field will be represented by a checkbox. When checkbox is not checked, first field element will be the active condition. When it is checked, the condition will be set from the second field element.
  • Otherwise, the field will be a combo box (SELECT). The array key will be used as a title, the value as a condition.

Values:

  • When value is an array (must be a 3-element array), the DBLQuery::addCondition() method is called. First element is a name, second is an operator, third is a value.
  • When value is a string, it is passed to query-specific condition method. For DBLSQLQuery descendants, the addSQLCondition() method is used.
  • When value is an empty string or an empty array (0-element), no condition is added. You will usually set the first element of the array to this value to implement "no filter".

Located in /DBLConditionField.php (line 40)

DBLField
   |
   --DBLConditionField
Variable Summary
bool $checkbox
array $conds
Method Summary
DBLConditionField DBLConditionField (string $name, string $titleTxt, string $titleHTML, mixed $conditions, array $condisions)
void addCondition (mixed $value, mixed &$f, mixed &$q)
void formatFilter (mixed $value, mixed &$r, mixed $formName)
Variables
Methods
Constructor DBLConditionField (line 60)

Constructor.

DBLConditionField DBLConditionField (string $name, string $titleTxt, string $titleHTML, mixed $conditions, array $condisions)
  • string $name: Field name - see DBLField.
  • string $titleTxt: Field textual title - see DBLField.
  • string $titleHTML: Field HTML title - see DBLField.
  • array $condisions: The conditions to filter by. See class description for detals.
addCondition (line 91)
void addCondition (mixed $value, mixed &$f, mixed &$q)

Redefinition of:
DBLField::addCondition()
Add condition(s) to the query according to the filter value.
formatFilter (line 75)
void formatFilter (mixed $value, mixed &$r, mixed $formName)

Redefinition of:
DBLField::formatFilter()
Format field for the filter form.

Inherited Methods

Inherited From DBLField

DBLField::DBLField()
DBLField::acceptFilterValue()
DBLField::acceptValue()
DBLField::addCondition()
DBLField::checkValue()
DBLField::formatDetail()
DBLField::formatEdit()
DBLField::formatFilter()
DBLField::formatIndex()
DBLField::jsCheck()
DBLField::setTitle()
DBLField::splitValue()

Documentation generated on Mon, 6 Sep 2004 21:57:04 +0200 by phpDocumentor 1.2.3