osc_get_categories()

osc_get_categories()

Gets the list of categories as a tree

Code osc_get_categories():

    function osc_get_categories() {
       if ( !View::newInstance()->_exists('categories') ) {
           osc_export_categories(Category::newInstance()->toTree());
        }
        return  View::newInstance()->_get('categories');
    }

    /**
     * @return array
     */