Skip to content

Commit

Permalink
[FEATURE] Make pidInList and recursive configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
schloram committed Dec 18, 2023
1 parent 4d06af5 commit 4e3b4df
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Classes/DataProcessing/CategoriesProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
**/
Expand All @@ -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 = [];
Expand Down

0 comments on commit 4e3b4df

Please sign in to comment.