@@ 853-868 (lines=16) @@ | ||
850 | * @param array|null $data |
|
851 | * @return ObjectDataInterface[] |
|
852 | */ |
|
853 | public function convertObjects(array $data = null) |
|
854 | { |
|
855 | return array_filter( |
|
856 | array_map( |
|
857 | [$this, 'convertObject'], |
|
858 | array_filter( |
|
859 | (array) $data, |
|
860 | 'is_array' |
|
861 | ) |
|
862 | ), |
|
863 | function ($item) { |
|
864 | // @TODO once a logger is available we should log an INFO message if the object could not be converted |
|
865 | return !empty($item); |
|
866 | } |
|
867 | ); |
|
868 | } |
|
869 | ||
870 | /** |
|
871 | * @param array|null $data |
|
@@ 1059-1074 (lines=16) @@ | ||
1056 | * @param array|null $data |
|
1057 | * @return RenditionData[] |
|
1058 | */ |
|
1059 | public function convertRenditions(array $data = null) |
|
1060 | { |
|
1061 | return array_filter( |
|
1062 | array_map( |
|
1063 | [$this, 'convertRendition'], |
|
1064 | array_filter( |
|
1065 | $data, |
|
1066 | 'is_array' |
|
1067 | ) |
|
1068 | ), |
|
1069 | function ($item) { |
|
1070 | // @TODO once a logger is available we should log an INFO message if the rendition could not be converted |
|
1071 | return !empty($item); |
|
1072 | } |
|
1073 | ); |
|
1074 | } |
|
1075 | ||
1076 | /** |
|
1077 | * Convert given input data to an Extension object |
|
@@ 1595-1607 (lines=13) @@ | ||
1592 | * @param array|null $data |
|
1593 | * @return ObjectParentData[] |
|
1594 | */ |
|
1595 | public function convertObjectParents(array $data = null) |
|
1596 | { |
|
1597 | return array_filter( |
|
1598 | array_map( |
|
1599 | [$this, 'convertObjectParentData'], |
|
1600 | (array) ($data ?? []) |
|
1601 | ), |
|
1602 | function ($item) { |
|
1603 | return !empty($item); |
|
1604 | // @TODO once a logger is available we should log an INFO message if the parent data could not be converted |
|
1605 | } |
|
1606 | ); |
|
1607 | } |
|
1608 | ||
1609 | /** |
|
1610 | * Convert given input data to a ObjectParentData object |