[TYPO3-mvc] Fluid List Item Issue
Franz Koch
typo3.RemoveForMessage at elements-net.de
Wed Dec 29 11:28:21 CET 2010
Hey Dawid,
> I have small question to this example. Is this code (I mean the
> controller) should go to departmentController ? If yes why we are
> creating new repository ? Every controller has a repository to his
> model. So why we`re creating new one ? Or meybe it should go to other
> controller ?
I somehow don't get the question. Not every controller must by default
have a repository for it's models - depends on the functionality the
controller is providing. And in the example I'm only creating a instance
of a certain repository that I need to fetch some records from - it
doesn't matter if this is a repository of my own extension or a
3rd-party extension. You can use your repositories wherever you like
(f.e. of course also in services you create etc).
And if you put this code snippet inside the department controller or the
employee controller depends on your domain and the intention of that
view I'd say. In this case I'd say it would also fit in the employee
controller, as the main purpose is to display employees and not to list
departments.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list