[TYPO3-mvc] Tx_Extbase_MVC_Controller_Argument StoragePage
"Christian Müller (Kitsunet)"
christian at kitsunet.de
Tue Jun 22 08:06:43 CEST 2010
On 21.06.2010 21:33, Andreas Ofner wrote:
> 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
Yes that is exactly the hack I did, but I like the proposal to look for
a Repository and custom findObjectByUid() anyone else thoughts about
that? For me that sounds like a good solution...
Christian
More information about the TYPO3-project-typo3v4mvc
mailing list