ModelBundle/Repository/TrashItemRepository.php
public function removeTrashItems(array $trashItemIds)
    {
        array_walk($trashItemIds, function(&$trashItemId) {$trashItemId = new \MongoId($trashItemId);});

        $qb = $this->createQueryBuilder();
        $qb->remove()
            ->field('id')->in($trashItemIds)
            ->getQuery()
            ->execute();
    }
public function removeTrashItems(array $trashItemIds)
    {
        array_walk($trashItemIds, function(&$trashItemId) {$trashItemId = new \MongoId($trashItemId);});

        $qb = $this->createQueryBuilder();
        $qb->remove()
            ->field('id')->in($trashItemIds)
            ->getQuery()
            ->execute();
    }
public function removeTrashItems ( array $ trashItemIds ) { array_walk ( $ trashItemIds , function ( & $ trashItemId ) { $ trashItemId = new \ MongoId ( $ trashItemId ) ; } ) ; $ qb = $ this -> createQueryBuilder ( ) ; $ qb -> remove ( ) -> field ( 'id' ) -> in ( $ trashItemIds ) -> getQuery ( ) -> execute ( ) ; }
@param array $trashItemIds

@throws \Doctrine\ODM\MongoDB\MongoDBException
@param array $trashItemIds