Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners

MaxDB PHP Generator online Help

Prev Return to chapter overview Next

OnGetSelectionFilters

This event allows you to specify a set of pre-defined options for record selection.

 

Signature:

function OnGetSelectionFilters(FixedKeysArray $columns, &$result)

 

Parameters:

$columns

An associative array of columns available for filtering.

$result

An associative array of selection options (caption => filter)

 

Example

 

This example adds "Americas", "Asia+Africa", and "Europe" selection options. Clicking an option selects the corresponding countries.

 

$result = array(

    'Americas' => new FilterCondition(

        $columns['continent'],

        FilterConditionOperator::ENDS_WITH,

        array('America')

    ),

    'Asia+Africa' => new FilterGroup(FilterGroupOperator::OPERATOR_OR,

        array(

            new FilterCondition($columns['continent'], 

                       FilterConditionOperator::EQUALS, array('Asia')),

            new FilterCondition($columns['continent'],

                       FilterConditionOperator::EQUALS, array('Africa'))

        )

    ),

    'Europe' => new FilterCondition(

        $columns['continent'],

        FilterConditionOperator::EQUALS,

        array('Europe')

    ),

);



Prev Return to chapter overview Next