Skip to content
Snippets Groups Projects
Commit 7b64c8a4 authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong:
Browse files

Update ContextUtils_lib

parent 2cc62b4a
No related branches found
No related tags found
1 merge request!32023.2 modules plattform
Pipeline #29084 failed
......@@ -226,36 +226,22 @@ ContextUtils.loadContent = function(pEntity, pUid, pFields, pExcludeIDs, pProvid
return [];
}
let conf = entities.createConfigForLoadingRows()
.entity(pEntity)
.uids(pUid)
var conf = entities.createConfigForLoadingRows()
.fields(pFields);
var recipe = neonFilter.createEntityRecordsRecipeBuilder()
.entity(pEntity)
.uidsIncludelist(pUid);
if (pProvider)
{
conf.provider(pProvider);
recipe.provider(pProvider);
}
if (pExcludeIDs)
{
let childsArray = [{
"type": "row",
"name": "#UID",
"operator": "NOT_IN",
"value": JSON.stringify(pExcludeIDs),
"key": JSON.stringify(pExcludeIDs),
"contenttype": "TEXT"
}];
let pFilterParent = {
"type": "group",
"operator": "OR",
"childs": childsArray
};
conf.filter(JSON.stringify(pFilterParent));
recipe.uidsExcludelist(pExcludeIDs);
}
conf.fromEntityRecordsRecipe(recipe.toString());
let rows = entities.getRows(conf);
return rows && rows.length > 0 ? rows : [];
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment