private function getAggregatorsFromEntities(ObjectManager $objectManager, array $entities)
    {
        $aggregators = [];

        foreach ($entities as $entity) {
            $entityClassName = ClassUtils::getClass($entity);
            if (array_key_exists($entityClassName, $this->entitiesAggregators)) {
                foreach ($this->entitiesAggregators[$entityClassName] as $aggregator) {
                    $aggregators[] = new $aggregator($entity, $objectManager->getClassMetadata($entityClassName)->getIdentifierValues($entity));
                }
            }
        }

        return $aggregators;
    }
private function getAggregatorsFromEntities(ObjectManager $objectManager, array $entities)
    {
        $aggregators = [];

        foreach ($entities as $entity) {
            $entityClassName = ClassUtils::getClass($entity);
            if (array_key_exists($entityClassName, $this->entitiesAggregators)) {
                foreach ($this->entitiesAggregators[$entityClassName] as $aggregator) {
                    $aggregators[] = new $aggregator($entity, $objectManager->getClassMetadata($entityClassName)->getIdentifierValues($entity));
                }
            }
        }

        return $aggregators;
    }
private function getAggregatorsFromEntities ( ObjectManager $ objectManager , array $ entities ) { $ aggregators = [ ] ; foreach ( $ entities as $ entity ) { $ entityClassName = ClassUtils :: getClass ( $ entity ) ; if ( array_key_exists ( $ entityClassName , $ this -> entitiesAggregators ) ) { foreach ( $ this -> entitiesAggregators [ $ entityClassName ] as $ aggregator ) { $ aggregators [ ] = new $ aggregator ( $ entity , $ objectManager -> getClassMetadata ( $ entityClassName ) -> getIdentifierValues ( $ entity ) ) ; } } } return $ aggregators ; }
Returns the aggregators instances of the provided entities.

@param  \Doctrine\Common\Persistence\ObjectManager $objectManager
@param  object[] $entities
@return array
Returns the aggregators instances of the provided entities .