public function deleteTagging(Taggable $resource)
    {
        $taggingList = $this->em->createQueryBuilder()
            ->select('t')
            ->from($this->taggingClass, 't')

            ->where('t.resourceType = :type')
            ->setParameter('type', $resource->getTaggableType())

            ->andWhere('t.resourceId = :id')
            ->setParameter('id', $resource->getTaggableId())

            ->getQuery()
            ->getResult();

        foreach ($taggingList as $tagging) {
            $this->em->remove($tagging);
        }
    }
public function deleteTagging(Taggable $resource)
    {
        $taggingList = $this->em->createQueryBuilder()
            ->select('t')
            ->from($this->taggingClass, 't')

            ->where('t.resourceType = :type')
            ->setParameter('type', $resource->getTaggableType())

            ->andWhere('t.resourceId = :id')
            ->setParameter('id', $resource->getTaggableId())

            ->getQuery()
            ->getResult();

        foreach ($taggingList as $tagging) {
            $this->em->remove($tagging);
        }
    }
public function deleteTagging ( Taggable $ resource ) { $ taggingList = $ this -> em -> createQueryBuilder ( ) -> select ( 't' ) -> from ( $ this -> taggingClass , 't' ) -> where ( 't.resourceType = :type' ) -> setParameter ( 'type' , $ resource -> getTaggableType ( ) ) -> andWhere ( 't.resourceId = :id' ) -> setParameter ( 'id' , $ resource -> getTaggableId ( ) ) -> getQuery ( ) -> getResult ( ) ; foreach ( $ taggingList as $ tagging ) { $ this -> em -> remove ( $ tagging ) ; } }
Deletes all tagging records for the given taggable resource

@param Taggable  $resource   Taggable resource
Deletes all tagging records for the given taggable resource