array
$extensions,
PluginCollection
$pluginCollection,
AppCollection
$appCollection,
): array
{ /** @var StorePluginStruct[] $mappedExtensions */
$mappedExtensions =
[];
foreach ($extensions as $extension) { if (empty($extension['name'
]) ||
empty($extension['localizedInfo'
]['name'
])) { continue;
} $mappedExtensions[] =
(new StorePluginStruct())->
assign([ 'name' =>
$extension['name'
],
'type' =>
$extension['type'
] ?? 'plugin',
'label' =>
$extension['localizedInfo'
]['name'
],
'shortDescription' =>
$extension['localizedInfo'
]['shortDescription'
] ?? '',
'iconPath' =>
$extension['iconPath'
] ?? null,
'category' =>
$extension['language'
] ?? null,
'region' =>
$extension['region'
] ?? null,
'manufacturer' =>
$extension['producer'
]['name'
] ?? null,
'position' =>
$extension['priority'
] ?? null,
'isCategoryLead' =>
$extension['isCategoryLead'
] ?? false,
]);