Skip to content

error with getResourceIdsForTag() #37

Description

@Grazulex

Hello,

I have try like in the document this code to find "medias" with a type of tag :

` $tagRepo = $this->getDoctrine()->getManager()->getRepository('DoctrineExtensions\Taggable\Entity\Tag');

     // find all article ids matching a particular query
     $ids = $tagRepo->getResourceIdsForTag('media', 'cd');

     // get the tags and count for all articles
     $tags = $tagRepo->getTagsWithCountArray('media');
     foreach ($tags as $name => $count) {
         echo sprintf('The tag "%s" matches "%s" medias', $name, $count);
     }  `

When I try , I have always the same error :

The class 'DoctrineExtensions\Taggable\Entity\Tag' was not found in the chain configured namespaces AppBundle\Entity, FPN\TagBundle\Entity

I know that the issue is with the ORM's mapping but I don't know how I can fixed that.

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions