Last active
November 18, 2021 12:05
-
-
Save MrMooky/fc1fad5a47f2942e4c8c6208a66c99f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function findSimilarInCategories($categories, $ignore_id) | |
{ | |
$query = $this->createQuery(); | |
// $catUids = []; | |
// foreach ($categories as $category) { | |
// $catUids[] = $category->getUid(); | |
// } | |
// \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($catUids); | |
$query->matching( | |
$query->logicalNot( | |
$query->equals('uid', $ignore_id) | |
), | |
$query->logicalOr( | |
$query->in('categories', $categories) | |
) | |
); | |
return $query->setLimit(12)->execute(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ich würde das draus machen: