sfFormFilterDoctrine is the base class for filter forms based on Doctrine
objects.
Method Summary
-
addBooleanQuery($query, $field, $value)
-
addDateQuery($query, $field, $values)
-
addEnumQuery($query, $field, $value)
-
addForeignKeyQuery($query, $field, $value)
-
addNumberQuery($query, $field, $values)
-
addTextQuery($query, $field, $values)
-
Query
buildQuery($values)
Builds a Doctrine Query based on the passed values.
-
camelize($text)
-
getColName($field)
-
getFieldName($colName)
-
array
getFields()
Returns the fields and their filter type.
-
string
getModelName()
Returns the current model name.
-
Query
getQuery()
Returns a Doctrine Query based on the current values form the form.
-
getTable()
-
string
getTableMethod()
Get the name of the table method used to retrieve the query object for the
filter
-
array
processValues($values)
Processes cleaned up values with user defined methods.
-
setTableMethod($tableMethodName)
Set the name of the table method used to retrieve the query object for the
filter
Method Details
-
addBooleanQuery ($query, $field, $value)
Browse code
-
addDateQuery ($query, $field, $values)
Browse code
-
addEnumQuery ($query, $field, $value)
Browse code
-
addForeignKeyQuery ($query, $field, $value)
Browse code
-
addNumberQuery ($query, $field, $values)
Browse code
-
addTextQuery ($query, $field, $values)
Browse code
-
(Query) buildQuery ($values)
Browse code
| $values |
An array of parameters to build the Query object
|
Builds a Doctrine Query based on the passed values.
returns A Doctrine Query object
-
-
-
getFieldName ($colName)
Browse code
-
Returns the fields and their filter type.
returns An array of fields with their filter type
-
(string) getModelName ()
Browse code
Returns the current model name.
returns The model class name
-
Returns a Doctrine Query based on the current values form the form.
returns A Doctrine Query object
-
-
(string) getTableMethod ()
Browse code
Get the name of the table method used to retrieve the query object for the
filter
-
(array) processValues ($values)
Browse code
| $values |
An array of cleaned up values to process
|
Processes cleaned up values with user defined methods.
To process a value before it is used by the buildQuery() method, you need to define an convertXXXValue() method where XXX is the PHP name of the column. The method must return the processed value or false to remove the value from the array of cleaned up values.
returns An array of cleaned up values processed by the user defined methods
-
setTableMethod ($tableMethodName)
Browse code
Set the name of the table method used to retrieve the query object for the
filter
|