@@ -375,14 +375,14 @@ public function GetAllExtensionsWithPreviouslyInstalled(): array
375375 * @return array<\iTopExtension>>
376376 */
377377
378- public function GetAllExtensionsToDisplayInSetup (bool $ bKeepMissingDependencyExtensions = false ): array
378+ public function GetAllExtensionsToDisplayInSetup (bool $ bKeepMissingDependencyExtensions = false , bool $ bMandatoryRemoteExtension = true ): array
379379 {
380380 $ aRes = [];
381381 foreach ($ this ->GetAllExtensionsWithPreviouslyInstalled () as $ oExtension ) {
382382 /** @var \iTopExtension $oExtension */
383- if (( $ oExtension ->sSource !== iTopExtension::SOURCE_WIZARD ) && ( $ oExtension ->bVisible ) ) {
384- if ($ bKeepMissingDependencyExtensions || ( count ($ oExtension ->aMissingDependencies ) == 0 ) ) {
385- if (!$ oExtension ->bMandatory ) {
383+ if ($ oExtension ->sSource !== iTopExtension::SOURCE_WIZARD && $ oExtension ->bVisible ) {
384+ if ($ bKeepMissingDependencyExtensions || count ($ oExtension ->aMissingDependencies ) == 0 ) {
385+ if (!$ oExtension ->bMandatory && $ bMandatoryRemoteExtension ) {
386386 $ oExtension ->bMandatory = ($ oExtension ->sSource === iTopExtension::SOURCE_REMOTE );
387387 }
388388 $ aRes [$ oExtension ->sCode ] = $ oExtension ;
@@ -393,10 +393,10 @@ public function GetAllExtensionsToDisplayInSetup(bool $bKeepMissingDependencyExt
393393 return $ aRes ;
394394 }
395395
396- public function GetAllExtensionsOptionInfo (): array
396+ public function GetAllExtensionsOptionInfo (bool $ bMandatoryRemoteExtension = true ): array
397397 {
398398 $ aRes = [];
399- foreach ($ this ->GetAllExtensionsToDisplayInSetup () as $ sCode => $ oExtension ) {
399+ foreach ($ this ->GetAllExtensionsToDisplayInSetup (false , $ bMandatoryRemoteExtension ) as $ sCode => $ oExtension ) {
400400 $ aRes [] = [
401401 'extension_code ' => $ oExtension ->sCode ,
402402 'title ' => $ oExtension ->sLabel ,
0 commit comments