public static function getAllNotInstalledApplications($params) { $myApplicationsManager = new EyeosApplicationsManager(); $applications = $myApplicationsManager->getAllNotInstalledApplications($params); $return = null; foreach ($applications as $appDesc) { $appMeta = $appDesc->getMeta(); $sysParams = $appMeta->get('eyeos.application.systemParameters'); $imagePath = $appMeta->get('eyeos.application.iconUrl'); $imageIsValid = true; try { $file = FSI::getFile($imagePath); } catch (Exception $e) { $imageIsValid = false; } if ($imageIsValid && !$file->isReadable()) { $imageIsValid = false; } if (!$imageIsValid) { $imagePath = 'sys:///extern/images/48x48/apps/preferences-desktop-default-applications.png'; } $return[] = array('name' => $appDesc->getName(), 'displayName' => $appMeta->get('eyeos.application.name') !== null ? $appMeta->get('eyeos.application.name') : $appDesc->getName(), 'app' => $appDesc->getName(), 'shortDescription' => $appMeta->get('eyeos.application.description'), 'image' => FSI::toExternalUrl($imagePath), 'favorite' => $myApplicationsManager->isApplicationFavorite($appDesc) ? 1 : 0, 'lists' => $appMeta->get('eyeos.application.category'), 'listable' => $sysParams['listable'] == 'true' ? 1 : 0, 'installed' => $myApplicationsManager->isApplicationInstalled($appDesc) ? 1 : 0); } return $return; }