Stigi
Stigi

Reputation: 109

TYPO3 Repository add new query

I have a little problem. How do I add the following to my repository?

repository by pastebin.com

I would also like to add the following.

$date = new \DateTime('midnight');
$query->matching(
$query->greaterThanOrEqual('date', $date->format('Y-m-d H:i:s'))
);

Separate from each other it works. Thanks

Upvotes: 1

Views: 137

Answers (1)

Stigi
Stigi

Reputation: 109

It works!

...
$query->matching(
$query->logicalAnd(
$query -> logicalAnd($constraints),
$query->greaterThanOrEqual('date', $date->format('Y-m-d H:i:s'))
)
);
...

Upvotes: 1

Related Questions