[TYPO3-mvc] Tx_Extbase_MVC_Controller_Argument StoragePage

Andreas Ofner andreaso.typo3 at gmail.com
Mon Jun 21 21:33:41 CEST 2010


Hello Franz,

Am 21.06.10 20:41, schrieb Franz Koch:
> I haven't had a look at the code, but I'd say extbase should use a
> repository (or maybe even a factory via a @factory annotation etc) to
> resolve a object if one is available. If none is available it shall
> proceed as it does currently.
> Or it should strictly ignore the storagePage, just as it does when
> mapping properties.

funny - i had the same problems a few hours ago.
I tried to include an "ext_base" extension twice on single page.
I disabled setRespectStoragePage() in my custom "finder method"
inside my repository but the detail view doesnt work.

I started to search where the "AND tx_xyz_domain_model_xyz.pid IN (0)" 
comes from :-)

The (think) the relevant code is in Argument.php

protected function findObjectByUid($uid) {
   $query = $this->queryFactory->create($this->dataType);
   $query->getQuerySettings()->setRespectSysLanguage(FALSE);
   $result = $query->matching($query->equals('uid',$uid))->execute();
   $object = NULL;
   if (count($result) > 0) {
     $object = current($result);
   }
   return $object;
}

Appending $query->getQuerySettings()->setRespectStoragePage(FALSE);
after $query->getQuerySettings()->setRespectSysLanguage(FALSE);
would be quick hack.

ext_base is fairly new to me :-)

Is it possible to look up for an existing custom [2]
findObjectByUid() of the related repository in this method?
I think this solution would be better.

I am also interesetd in an solution in this issue ...

Kind, Regards,
Andreas

[1] Tx_Extbase_MVC_Controller_Argument in subpackage MVC\Controller
[2] oberwritten by the user


More information about the TYPO3-project-typo3v4mvc mailing list