-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete readme files #5
Comments
I'm struggling with this too. Installed via FPNTagBundle as per the documentation and I can create tags and add them to entities OK but can't get the repository to work :( in an action: $em = $this->getDoctrine()->getEntityManager();
$tagRepo = $em->getRepository('DoctrineExtensions\\Taggable\\Entity\\Tag');
$ids = $tagRepo->getResourceIdsForTag('organisation', $tag); I get
It's bound to be something simple, but I don't know enough about the Doctrine configuration to fix this. Can you help, please @FabienPennequin? |
I am also struggling with this. Does anyone have a good step by step procedure for a newbie? |
You can try to add the annotation to your Tag Entity @ORM\Entity(repositoryClass="DoctrineExtensions\Taggable\Entity\TagRepository") and using the repo $em = $this->getDoctrine()->getEntityManager();
$tagRepo = $em->getRepository('YourBundle:Tag');
$ids = $tagRepo->getResourceIdsForTag('organisation', $tag); This have work for me (symfony 2.1.5) |
You can also extend the included TagRepository if you need to have a repository of your own. <?php
namespace App\Bundle\TagBundle\Entity;
use Doctrine\ORM\NoResultException;
use DoctrineExtensions\Taggable\Entity\TagRepository as BaseRepository;
class TagRepository extends BaseRepository {
//... Now you can do $em = $this->getDoctrine()->getEntityManager();
$tagRepo = $em->getRepository('YourBundle:Tag');
$ids = $tagRepo->getResourceIdsForTag('organisation', $tag); like @estheban has above. |
Hi ! Same here, I began to integrate this bundle to my project but I'm stock at the : "Finally, you need to setup doctrine for register metadata directory and register TagListener." I just need the file where to put this code. I search on google and found this post on google : https://groups.google.com/forum/#!topic/symfony2/tqxGRLiEDTs But I can see the link, it seems to have work for this guy. Thank's, Anthony |
This is the shittiest readme file ever written. Actually pissed me off, it's like it was written to be purposefully confusing |
Sorry but in your readme.md file you say "Finally, you need to setup doctrine for register metadata directory and register TagListener." Ok. But where I have to put this code? How can I configure doctrine for this stuff?
Thank you in advance.
The text was updated successfully, but these errors were encountered: