PHP Class FluidTYPO3\Vhs\ViewHelpers\Iterator\FilterViewHelper
Filters an array by filtering the array, analysing each member
and assering if it is equal to (weak type) the
filter parameter.
If
propertyName is set, the ViewHelper will try to extract this
property from each member of the array.
Iterators and ObjectStorage etc. are supported.
ファイルを表示
Open project: fluidtypo3/vhs
Public Methods
Protected Methods
Method |
Description |
|
filter ( mixed $item, mixed $filter, string $propertyName ) : boolean |
Filter an item/value according to desired filter. Returns TRUE if
the item should be included, FALSE otherwise. This default method
simply does a weak comparison (==) for sameness. |
|
Method Details
filter()
protected method
Filter an item/value according to desired filter. Returns TRUE if
the item should be included, FALSE otherwise. This default method
simply does a weak comparison (==) for sameness.
public render ( mixed $subject = null, mixed $filter = null, string $propertyName = null, boolean $preserveKeys = false, boolean $invert = false, boolean $nullFilter = false ) : mixed |
$subject |
mixed |
The subject iterator/array to be filtered |
$filter |
mixed |
The comparison value |
$propertyName |
string |
Optional property name to extract and use for comparison instead of the object;
use on ObjectStorage etc. Note: supports dot-path expressions. |
$preserveKeys |
boolean |
If TRUE, keys in the array are preserved - even if they are numeric |
$invert |
boolean |
Invert the behavior of the view helper |
$nullFilter |
boolean |
If TRUE and $filter is NULL (not set) - to filter NULL or empty values |
return |
mixed |
|