public function __construct($view, $title_page)
 {
     parent::__construct($view);
     $lang = LangLoader::get('common', 'media');
     $this->set_title($lang['module_title']);
     $this->add_link(LangLoader::get_message('categories.management', 'categories-common'), MediaUrlBuilder::manage_categories());
     $this->add_link(LangLoader::get_message('category.add', 'categories-common'), MediaUrlBuilder::add_category());
     $this->add_link($lang['media.management'], MediaUrlBuilder::manage());
     $this->add_link($lang['media.actions.add'], MediaUrlBuilder::add());
     $this->add_link(LangLoader::get_message('configuration', 'admin-common'), MediaUrlBuilder::configuration());
     $env = $this->get_graphical_environment();
     $env->set_page_title($title_page, $lang['module_title']);
 }
 public function get_actions_tree_links()
 {
     $lang = LangLoader::get('common', 'media');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), MediaUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), MediaUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), MediaUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_media_link = new AdminModuleLink($lang['media.manage'], MediaUrlBuilder::manage());
     $manage_media_link->add_sub_link(new AdminModuleLink($lang['media.manage'], MediaUrlBuilder::manage()));
     $manage_media_link->add_sub_link(new AdminModuleLink($lang['media.actions.add'], MediaUrlBuilder::add()));
     $tree->add_link($manage_media_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), MediaUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['media.actions.add'], MediaUrlBuilder::add(), MediaAuthorizationsService::check_authorizations()->write() || MediaAuthorizationsService::check_authorizations()->contribution()));
     }
     return $tree;
 }
 protected function get_categories_management_url()
 {
     return MediaUrlBuilder::manage_categories();
 }