diff --git a/Civi/DataProcessor/FieldOutputHandler/NumberFieldOutputHandler.php b/Civi/DataProcessor/FieldOutputHandler/NumberFieldOutputHandler.php index d9fbb5d4c05d538f5b8f81886144cb79c2627ad8..262fc2d2a0fa2807e9dde2031b3f1a587137e027 100644 --- a/Civi/DataProcessor/FieldOutputHandler/NumberFieldOutputHandler.php +++ b/Civi/DataProcessor/FieldOutputHandler/NumberFieldOutputHandler.php @@ -81,6 +81,31 @@ class NumberFieldOutputHandler extends AbstractSimpleFieldOutputHandler implemen } } + /** + * Enable aggregation for this field. + * + * @return void + */ + public function enableAggregation() { + $dataFlow = $this->dataSource->ensureField($this->getAggregateFieldSpec()); + if ($dataFlow) { + $dataFlow->addAggregateOutputHandler($this); + } + } + + /** + * Disable aggregation for this field. + * + * @return void + */ + public function disableAggregation() { + $dataFlow = $this->dataSource->ensureField($this->getAggregateFieldSpec()); + if ($dataFlow) { + $dataFlow->removeAggregateOutputHandler($this); + } + } + + /** * When this handler has additional configuration you can add * the fields on the form with this function.