| @@ 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 |
|
| @@ 1597-1609 (lines=13) @@ | ||
| 1594 | * @param array|null $data |
|
| 1595 | * @return ObjectParentData[] |
|
| 1596 | */ |
|
| 1597 | public function convertObjectParents(array $data = null) |
|
| 1598 | { |
|
| 1599 | return array_filter( |
|
| 1600 | array_map( |
|
| 1601 | [$this, 'convertObjectParentData'], |
|
| 1602 | (array) ($data ?? []) |
|
| 1603 | ), |
|
| 1604 | function ($item) { |
|
| 1605 | return !empty($item); |
|
| 1606 | // @TODO once a logger is available we should log an INFO message if the parent data could not be converted |
|
| 1607 | } |
|
| 1608 | ); |
|
| 1609 | } |
|
| 1610 | ||
| 1611 | /** |
|
| 1612 | * Convert given input data to a ObjectParentData object |
|