public function get_root_category() { $config = MediaConfig::load(); $root = new MediaCategory(); $root->set_id(Category::ROOT_CATEGORY); $root->set_id_parent(Category::ROOT_CATEGORY); $root->set_name(LangLoader::get_message('root', 'main')); $root->set_rewrited_name('root'); $root->set_order(0); $root->set_authorizations($config->get_authorizations()); $root->set_description($config->get_root_category_description()); $root->set_content_type($config->get_root_category_content_type()); return $root; }