public function resetStats(array $entities)
     {
         foreach ($entities as $entity) {
            $ids = $entity->subscriptions
                          ->getQuery()
                          ->disableChain()
                          ->fetchValues('subscriber.id');

            $entity->set('subscriberCount', count($ids));
            $entity->set('subscriberIds', AnDomainAttribute::getInstance('set')->setData($ids));
            $entity->save();
        }
    }
public function resetStats(array $entities)
     {
         foreach ($entities as $entity) {
            $ids = $entity->subscriptions
                          ->getQuery()
                          ->disableChain()
                          ->fetchValues('subscriber.id');

            $entity->set('subscriberCount', count($ids));
            $entity->set('subscriberIds', AnDomainAttribute::getInstance('set')->setData($ids));
            $entity->save();
        }
    }
public function resetStats ( array $ entities ) { foreach ( $ entities as $ entity ) { $ ids = $ entity -> subscriptions -> getQuery ( ) -> disableChain ( ) -> fetchValues ( 'subscriber.id' ) ; $ entity -> set ( 'subscriberCount' , count ( $ ids ) ) ; $ entity -> set ( 'subscriberIds' , AnDomainAttribute :: getInstance ( 'set' ) -> setData ( $ ids ) ) ; $ entity -> save ( ) ; } }
Reset subscriptions stats.

@param array $entities
Reset subscriptions stats .