code: public function removeByContentTypeId(array $contentTypeIds)
      {
          $qb = $this->createQueryBuilder();
          $qb->updateMany()
              ->field('contentTypeId')->in($contentTypeIds)
              ->field('deleted')->set(true)
              ->getQuery()
              ->execute();
      }
docs: @param array $contentTypeIds
  
  @throws \Doctrine\ODM\MongoDB\MongoDBException