Skip to content
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

Open
sensorario opened this issue Mar 5, 2012 · 6 comments
Open

Incomplete readme files #5

sensorario opened this issue Mar 5, 2012 · 6 comments

Comments

@sensorario
Copy link

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.

@tonypiper
Copy link

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

Class DoctrineExtensions\Taggable\Entity\Tag is not a valid entity or mapped super class.

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?

@dantuck
Copy link

dantuck commented Jun 5, 2012

I am also struggling with this. Does anyone have a good step by step procedure for a newbie?

@estheban
Copy link

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)

@ornj
Copy link

ornj commented Apr 3, 2013

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.

@taoder
Copy link

taoder commented Nov 17, 2013

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

@ghost
Copy link

ghost commented Dec 2, 2017

This is the shittiest readme file ever written. Actually pissed me off, it's like it was written to be purposefully confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants