From 4e3b4df26d05da33691e42a816f2449eea9e44eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Schlosser?= Date: Mon, 18 Dec 2023 17:08:34 +0100 Subject: [PATCH] [FEATURE] Make pidInList and recursive configurable --- Classes/DataProcessing/CategoriesProcessor.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Classes/DataProcessing/CategoriesProcessor.php b/Classes/DataProcessing/CategoriesProcessor.php index 1a1f29ad..6b0bc055 100644 --- a/Classes/DataProcessing/CategoriesProcessor.php +++ b/Classes/DataProcessing/CategoriesProcessor.php @@ -40,6 +40,21 @@ * } * } * } + * Example usage (get categories by comma-separated-list of category ids from custom pid): + * + * categories = JSON + * categories { + * dataProcessing { + * 10 = headless-categories + * 10 { + * categoryIdList = 1,3,5 + * pidInList = leveluid:0 + * recursive = 250 + * + * as = categories + * } + * } + * } * * @codeCoverageIgnore **/ @@ -66,7 +81,8 @@ public function process( } $defaultQueryConfig = [ - 'pidInList' => 'root', + 'pidInList' => (string)$cObj->stdWrapValue('pidInList', $processorConfiguration, 'root'), + 'recursive' => (string)$cObj->stdWrapValue('recursive', $processorConfiguration, '0'), 'selectFields' => '{#sys_category}.{#uid} AS id, {#sys_category}.{#title}', ]; $queryConfig = [];