Evaluator::evaluate_multiple( array $aggregate_results, awsmug\Torro_Forms\DB_Objects\Submissions\Submission_Collection $submissions, awsmug\Torro_Forms\DB_Objects\Forms\Form $form )

Evaluates multiple specific form submissions.

Description

Unlike the evaluate() method, this method is used to evaluate the passed form submissions live. They aggregate results array should however be updated with the evaluation results in the same way as in evaluate().

See also

Parameters

$aggregate_results

(array) (Required) Aggregate results to update.

$submissions

(awsmug\Torro_Forms\DB_Objects\Submissions\Submission_Collection) (Required) Submission collection to evaluate.

$form

(awsmug\Torro_Forms\DB_Objects\Forms\Form) (Required) Form the submission applies to.

Return

(array) Updated aggregate evaluation results.

Source

File: src/modules/evaluators/evaluator.php

	public function evaluate_multiple( $aggregate_results, $submissions, $form ) {
		foreach ( $submissions as $submission ) {
			$aggregate_results = $this->evaluate_single( $aggregate_results, $submission, $form );
		}

		return $aggregate_results;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.