[TYPO3-mvc] Query settings for showing hidden objects
Marc Bastian Heinrichs
typo3 at mbh-web.de
Sat Mar 5 19:01:18 CET 2011
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