Topic: New method for application class re-ordering the application tabs

Whenever a new tabbed application is added to FrontAccounting, it appears in a tab just before the Setup tab as coded in the front_accounting class method init() and invoked at the end of the includes/session.inc file.

Any new extension developer would want to position their application's tab (if it is an application predominantly residing in a separate tab) at some specific place and not just before the Setup one.

To alleviate this situation without having to code inconsistently/redundantly in each extension, it would be better to have a method in the application class (in applications/application.php) on the following lines contemplated to be in my hello_world extension for now:

// Change tab order
        $i = 4; // set this extension on the 4th tab
        $x = $app->applications;
        $y = array_pop($app->applications); // this application was added last just now
        $app->applications = Array();
        $app->applications = array_merge(array_slice($x, 0, $i-1), array('hello' => $y), array_slice($x, $i-1));
        unset($x,$y,$i);