mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
filterAny method comments fixed to reflect actual operation
This commit is contained in:
parent
437fc2fda7
commit
2f59a6c59b
@ -355,21 +355,21 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a copy of this list which does not contain items matching any of these charactaristics.
|
||||
* Return a copy of this list which contains items matching any of these charactaristics.
|
||||
*
|
||||
* @example // filter bob from list
|
||||
* @example // only bob in the list
|
||||
* $list = $list->filterAny('Name', 'bob');
|
||||
* // SQL: WHERE "Name" = 'bob'
|
||||
* @example // filter aziz and bob from list
|
||||
* @example // azis or bob in the list
|
||||
* $list = $list->filterAny('Name', array('aziz', 'bob');
|
||||
* // SQL: WHERE ("Name" IN ('aziz','bob'))
|
||||
* @example // filter by bob or anybody aged 21
|
||||
* @example // bob or anyone aged 21 in the list
|
||||
* $list = $list->filterAny(array('Name'=>'bob, 'Age'=>21));
|
||||
* // SQL: WHERE ("Name" = 'bob' OR "Age" = '21')
|
||||
* @example // filter by bob or anybody aged 21 or 43
|
||||
* @example // bob or anyone aged 21 or 43 in the list
|
||||
* $list = $list->filterAny(array('Name'=>'bob, 'Age'=>array(21, 43)));
|
||||
* // SQL: WHERE ("Name" = 'bob' OR ("Age" IN ('21', '43'))
|
||||
* @example // bob age 21 or 43, phil age 21 or 43 would be excluded
|
||||
* @example // all bobs, phils or anyone aged 21 or 43 in the list
|
||||
* $list = $list->filterAny(array('Name'=>array('bob','phil'), 'Age'=>array(21, 43)));
|
||||
* // SQL: WHERE (("Name" IN ('bob', 'phil')) OR ("Age" IN ('21', '43'))
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user