2

osc_get_categories()

[php]osc_get_categories()[/php]

Gets the list of categories as a tree

Code osc_get_categories():

[php]
function osc_get_categories() {
if ( !View::newInstance()->_exists(‘categories’) ) {
osc_export_categories(Category::newInstance()->toTree());
}
return View::newInstance()->_get(‘categories’);
}

/**
* @return array
*/
[/php]