[TYPO3-mvc] best way to query other database readonly from extbase extension
Philipp
philippwrann at gmx.at
Wed Jan 29 10:14:48 CET 2014
Simply use repository that is not inherited from Extbase\Repository
@var \Vendor\Extension\Domain\Repository\ExternalRepository
@inject
protected $repository;
public function indexAction() {
$this->view->assign('objects',$this->repository->find());
}
class ExternalRepository implements \TYPO3\CMS\Core\SingletonInterface {
public function initialize() {
build connection to persistence;
}
public function find(array $settings=NULL){
add constraints based on settings
}
}
and of course you could map your data into Domainmodels but i dont think its neccessary in your case.
More information about the TYPO3-project-typo3v4mvc
mailing list