[TYPO3-mvc] Query settings for showing hidden objects

Michael Knoll mimi at kaktusteam.de
Sat Mar 5 23:57:53 CET 2011


Hey Marc Bastian,

thanks a lot for your reply... I'll give it a try and will never again 
write ExtBase in the future... hm... ooops... I did it again... Last 
time I swear :-)

Greetings

Mimi

PS: Thanks for your job here!



Am 05.03.11 19:01, schrieb Marc Bastian Heinrichs:
> Hey Mimi,
>
>> I have a domain object with a property 'hidden' which is filled by the
>> corresponding database field. Now I want to hide the object in frontend
>> - this is working fine, as an ExtBase query doesn't return the object
>> anymore, but in backend, I want to show it (to set it to hidden or
>> unhide it).
>>
>> So my question is: Is there a way to tell ExtBase to show hidden
>> objects? With query-settings or something?
>
> Jep, via $query->getQuerySettings()->setRespectEnableFields(FALSE);
> and adding an constraint equals('deleted', 0) to your query object.
>
> Best
> Marc Bastian
>
>
> PS: It's Extbase, not ExtBase :-)
>



More information about the TYPO3-project-typo3v4mvc mailing list