Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 956c133

Browse files
committed
Update filters.php - add bitrix filters
1 parent 4ec8f8b commit 956c133

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

ggrachdev.debugbar/filters.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,39 @@
8383
$data = $filterParams[0]($data);
8484
}
8585

86+
return $data;
87+
})
88+
// bitrix
89+
->addFilter('bxDisplayProps', function ($data, $filterParams) {
90+
if (\is_array($data)) {
91+
$data = \array_key_exists('DISPLAY_PROPERTIES', $data) ? $data['DISPLAY_PROPERTIES'] : [];
92+
}
93+
else
94+
{
95+
$data = [];
96+
}
97+
98+
return $data;
99+
})
100+
->addFilter('bxProps', function ($data, $filterParams) {
101+
if (\is_array($data)) {
102+
$data = \array_key_exists('PROPERTIES', $data) ? $data['PROPERTIES'] : [];
103+
}
104+
else
105+
{
106+
$data = [];
107+
}
108+
109+
return $data;
110+
})
111+
->addFilter('bxItems', function ($data, $filterParams) {
112+
if (\is_array($data)) {
113+
$data = \array_key_exists('ITEMS', $data) ? $data['ITEMS'] : [];
114+
}
115+
else
116+
{
117+
$data = [];
118+
}
119+
86120
return $data;
87121
});

0 commit comments

Comments
 (0)