asdasd
This commit is contained in:
@@ -240,24 +240,20 @@ class ApiKernel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 💡 Bereinigungsmethode
|
// 💡 Bereinigungsmethode
|
||||||
private function cleanReferenceComponents(array $components): array {
|
private function cleanReferenceComponents(array $node): array
|
||||||
foreach ($components as &$component) {
|
{
|
||||||
if (is_array($component) && isset($component['type'])) {
|
if (isset($node['type']) && $node['type'] === 'library-reference') {
|
||||||
|
$node['content'] = '';
|
||||||
|
$node['components'] = [];
|
||||||
|
}
|
||||||
|
|
||||||
if ($component['type'] === 'library-reference') {
|
foreach ($node as $key => $value) {
|
||||||
if (isset($component['content'])) {
|
if (is_array($value)) {
|
||||||
$component['content'] = '';
|
$node[$key] = $this->cleanReferenceComponents($value);
|
||||||
}
|
|
||||||
if (isset($component['components'])) {
|
|
||||||
$component['components'] = [];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($component['components']) && is_array($component['components'])) {
|
|
||||||
$component['components'] = $this->cleanReferenceComponents($component['components']);
|
return $node;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $components;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user