[TYPO3-dev] Typo3QuerySettings - limits to the query result by cruser_id
Gianluca Strafella
gianluca.strafella at webformat.com
Mon Sep 16 10:46:03 CEST 2013
Hi Tomita,
Typo3QuerySettings is not related to field cruser_id in some way. So,
you could extend rather method createQuery of the class
Tx_Extbase_Persistence_Repository to limit each repository query to
specific cruser_id value.
For example, in your Repository, you could override method createQuery
with a similar code:
public function createQuery() {
$query = parent::createQuery();
//99 is a cruser_id
$query = $query->matching(
$query->equals("cruserId", 99)
);
return $query;
}
In this way, each query in your repository will contain the clause "and
cruser_id=99"
Regards,
Gianluca
P.s. I think that you support request is most specific of list
typo3.projects.typo3v4mvc :)
Gianluca Strafella
Software Developer
gianluca.strafella at webformat.com
Tel. +39-0427-926.389
WEBFORMAT srl – www.webformat.com
Via S. Francesco d'Assisi, 6 – 20122 MILANO
Corte Europa, 12 - 33097 SPILIMBERGO (PN)
Il 12/09/2013 09:14, Tomiţă MILITARU ha scritto:
> Hello,
>
> I want to limit the query by cruser_id = $someUserId in frontend from the
> query settings, but I don't know if that is possible.
> Is there a way to extend Typo3QuerySettings so that I could use something
> like $querySettings->setCruserId($someUserId )?
>
> Thanks,
> Tomita
>
More information about the TYPO3-dev
mailing list