PHP Class Neos\Neos\TypoScript\Helper\ArrayHelper

These helpers are *WORK IN PROGRESS* and *NOT STABLE YET*
Inheritance: implements Neos\Eel\ProtectedContextAwareInterface
Afficher le fichier Open project: neos/neos-development-collection

Méthodes publiques

Méthode Description
allowsCallOfMethod ( string $methodName ) : boolean All methods are considered safe
filter ( array | Doctrine\Common\Collections\Collection $set, string $filterProperty ) : array Filter an array of objects, by only keeping the elements where each object's $filterProperty evaluates to TRUE.
filterNegated ( array | Doctrine\Common\Collections\Collection $set, string $filterProperty ) : array Filter an array of objects, by only keeping the elements where each object's $filterProperty evaluates to FALSE.
groupBy ( array | Doctrine\Common\Collections\Collection $set, string $groupingKey ) : array The input is assumed to be an array or Collection of objects. Groups this input by the $groupingKey property of each element.

Méthodes protégées

Méthode Description
filterInternal ( array | Doctrine\Common\Collections\Collection $set, string $filterProperty, boolean $negate ) : array Internal method for filtering

Method Details

allowsCallOfMethod() public méthode

All methods are considered safe
public allowsCallOfMethod ( string $methodName ) : boolean
$methodName string
Résultat boolean

filter() public méthode

Filter an array of objects, by only keeping the elements where each object's $filterProperty evaluates to TRUE.
public filter ( array | Doctrine\Common\Collections\Collection $set, string $filterProperty ) : array
$set array | Doctrine\Common\Collections\Collection
$filterProperty string
Résultat array

filterInternal() protected méthode

Internal method for filtering
protected filterInternal ( array | Doctrine\Common\Collections\Collection $set, string $filterProperty, boolean $negate ) : array
$set array | Doctrine\Common\Collections\Collection
$filterProperty string
$negate boolean
Résultat array

filterNegated() public méthode

Filter an array of objects, by only keeping the elements where each object's $filterProperty evaluates to FALSE.
public filterNegated ( array | Doctrine\Common\Collections\Collection $set, string $filterProperty ) : array
$set array | Doctrine\Common\Collections\Collection
$filterProperty string
Résultat array

groupBy() public méthode

The input is assumed to be an array or Collection of objects. Groups this input by the $groupingKey property of each element.
public groupBy ( array | Doctrine\Common\Collections\Collection $set, string $groupingKey ) : array
$set array | Doctrine\Common\Collections\Collection
$groupingKey string
Résultat array