src/Packages.php
public static function menu($package)
    {
        $dir = __DIR__.'/../../'.$package.'/src';
        $files = is_dir($dir) ? scandir($dir) : [];

        foreach ($files as $file) {
            if ($file == 'Menu.json') {
                $file_r = file_get_contents($dir.'/'.$file);

                return json_decode($file_r, true);
            }
        }

        return [];
    }
public static function menu($package)
    {
        $dir = __DIR__.'/../../'.$package.'/src';
        $files = is_dir($dir) ? scandir($dir) : [];

        foreach ($files as $file) {
            if ($file == 'Menu.json') {
                $file_r = file_get_contents($dir.'/'.$file);

                return json_decode($file_r, true);
            }
        }

        return [];
    }
public static function menu ( $ package ) { $ dir = __DIR__ . '/../../' . $ package . '/src' ; $ files = is_dir ( $ dir ) ? scandir ( $ dir ) : [ ] ; foreach ( $ files as $ file ) { if ( $ file == 'Menu.json' ) { $ file_r = file_get_contents ( $ dir . '/' . $ file ) ; return json_decode ( $ file_r , true ) ; } } return [ ] ; }
Returns the package menu if exists.

@param string $package
Returns the package menu if exists .