src/Aggregation/AbstractAggregation.php
public function addAggregation(AbstractAggregation $abstractAggregation)
    {
        if (!$this->aggregations) {
            $this->aggregations = $this->createBuilderBag();
        }

        $this->aggregations->add($abstractAggregation);
        
        return $this;
    }
public function addAggregation(AbstractAggregation $abstractAggregation)
    {
        if (!$this->aggregations) {
            $this->aggregations = $this->createBuilderBag();
        }

        $this->aggregations->add($abstractAggregation);
        
        return $this;
    }
public function addAggregation ( AbstractAggregation $ abstractAggregation ) { if ( ! $ this -> aggregations ) { $ this -> aggregations = $ this -> createBuilderBag ( ) ; } $ this -> aggregations -> add ( $ abstractAggregation ) ; return $ this ; }
Adds a sub-aggregation.

@param AbstractAggregation $abstractAggregation

@return $this
Adds a sub - aggregation .