final protected function showEnabledAppsRegister():int
    {
        $this->params['applist'] = array();
        $file = json_decode(file_get_contents(FEnvFcm::get("framework.config.core.apps.file")));
        $i = 1;
        if ((is_string($file) && strlen($file) < 3) || (count((array) $file) == 0)) {
            Output::outputAsError("Ops! You do not have an enabled application.");
            return (false);
        }
        $str = "";
        foreach ($file as $val) {
            if ($val->enabled == "yes") {
                $str .= $i . ") " . $val->name . " : Enabled"  . "\n";
                array_push($this->params['applist'], $val->name);
                $i++;
            }
        }

        if (count($this->params['applist']) == 0) {
            Output::displayAsRed("Ops! You do not have an enabled app.");
            return (false);
        } else {
            Output::displayAsGreen("Your apps \n------------\n".$str, "none", false);
        }
        return (true);
    }
final protected function showEnabledAppsRegister():int
    {
        $this->params['applist'] = array();
        $file = json_decode(file_get_contents(FEnvFcm::get("framework.config.core.apps.file")));
        $i = 1;
        if ((is_string($file) && strlen($file) < 3) || (count((array) $file) == 0)) {
            Output::outputAsError("Ops! You do not have an enabled application.");
            return (false);
        }
        $str = "";
        foreach ($file as $val) {
            if ($val->enabled == "yes") {
                $str .= $i . ") " . $val->name . " : Enabled"  . "\n";
                array_push($this->params['applist'], $val->name);
                $i++;
            }
        }

        if (count($this->params['applist']) == 0) {
            Output::displayAsRed("Ops! You do not have an enabled app.");
            return (false);
        } else {
            Output::displayAsGreen("Your apps \n------------\n".$str, "none", false);
        }
        return (true);
    }
final protected function showEnabledAppsRegister ( ) : int { $ this -> params [ 'applist' ] = array ( ) ; $ file = json_decode ( file_get_contents ( FEnvFcm :: get ( "framework.config.core.apps.file" ) ) ) ; $ i = 1 ; if ( ( is_string ( $ file ) && strlen ( $ file ) < 3 ) || ( count ( ( array ) $ file ) == 0 ) ) { Output :: outputAsError ( "Ops! You do not have an enabled application." ) ; return ( false ) ; } $ str = "" ; foreach ( $ file as $ val ) { if ( $ val -> enabled == "yes" ) { $ str .= $ i . ") " . $ val -> name . " : Enabled" . "\n" ; array_push ( $ this -> params [ 'applist' ] , $ val -> name ) ; $ i ++ ; } } if ( count ( $ this -> params [ 'applist' ] ) == 0 ) { Output :: displayAsRed ( "Ops! You do not have an enabled app." ) ; return ( false ) ; } else { Output :: displayAsGreen ( "Your apps \n------------\n" . $ str , "none" , false ) ; } return ( true ) ; }
Show enabled app in apps.json
@return int
@throws Server500
Show enabled app in apps . json