symfony API

sfFormFilterDoctrine Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfFormFilterDoctrine is the base class for filter forms based on Doctrine objects.

Inheritence

sfFormFilterDoctrine  <  sfFormFilter

Method Summary

Methods inherited from sfFormFilter

Method Details

  • addBooleanQuery ()

  • addDateQuery ()

  • addEnumQuery ()

  • addForeignKeyQuery ()

  • addNumberQuery ()

  • addTextQuery ()

  • (Query) buildQuery ()

    Builds a Doctrine Query based on the passed values.

    returns A Doctrine Query object

  • camelize ()

  • (Doctrine_Query) doBuildQuery ($values)

    Builds a Doctrine query with processed values.


    Overload this method instead of {@link buildQuery()} to avoid running
    {@link processValues()} multiple times.

  • getColName ()

  • getFieldName ()

  • (array) getFields ()

    Returns the fields and their filter type.

    returns An array of fields with their filter type

  • (string) getModelName ()

    Returns the current model name.

    returns The model class name

  • (Query) getQuery ()

    Returns a Doctrine Query based on the current values form the form.

    returns A Doctrine Query object

  • (string) getRelatedModelName ($alias)

    $alias A relation alias

    Returns the name of the related model.

    throws InvalidArgumentException If no relation with the supplied alias exists on the current model

  • getTable ()

  • (string) getTableMethod ()

    Get the name of the table method used to retrieve the query object for the filter

  • (array) processValues ()

    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

  • setQuery ($query)

    Sets the query object to use.

  • setTableMethod ($tableMethod)

    Set the name of the table method used to retrieve the query object for the filter


    The specified method will be passed the query object before any changes
    are made based on incoming parameters.

  • setupInheritance ()

    Used in generated forms when models use inheritance.