Neos\Neos\TypoScript\Helper\ArrayHelper::filterInternal PHP Метод

filterInternal() защищенный Метод

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
Результат array
    protected function filterInternal($set, $filterProperty, $negate)
    {
        if (is_object($set) && $set instanceof Collection) {
            $set = $set->toArray();
        }
        return array_filter($set, function ($element) use($filterProperty, $negate) {
            $result = (bool) ObjectAccess::getPropertyPath($element, $filterProperty);
            if ($negate) {
                $result = !$result;
            }
            return $result;
        });
    }