Question

Most of the time, entities are located at src/Project/FooBundle/Entity/Foo.php. Then you can access the repository by:

$this->getRepository('ProjectFooBundle:Foo');

But how to access the repository when an entity is located at src/Project/FooBundle/Entity/Foo/Foo.php?

Était-ce utile?

La solution

as mentioned in my comment this can be done by the following syntax:

$this->getRepository('ProjectFooBundle:Foo/Foo');

or (as mentioned by @Touki)

$this->getRepository('ProjectFooBundle:Foo\Foo');
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top