Neos\Eel\FlowQuery\Operations\CountOperation::evaluate PHP Метод

evaluate() публичный Метод

public evaluate ( FlowQuery $flowQuery, array $arguments ) : void | integer
$flowQuery Neos\Eel\FlowQuery\FlowQuery the FlowQuery object
$arguments array filter arguments for this operation
Результат void | integer with the number of elements
    public function evaluate(FlowQuery $flowQuery, array $arguments)
    {
        if (count($arguments) == 0) {
            return count($flowQuery->getContext());
        } else {
            $flowQuery->pushOperation('count', []);
            $flowQuery->pushOperation('filter', $arguments);
        }
    }
CountOperation