public function get_actions_tree_links()
 {
     $request = AppContext::get_request();
     $year = $request->get_getint('year', date('Y'));
     $month = $request->get_getint('month', date('n'));
     $day = $request->get_getint('day', date('j'));
     $lang = LangLoader::get('common', 'calendar');
     $tree = new ModuleTreeLinks();
     $manage_categories_link = new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), CalendarUrlBuilder::manage_categories());
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('categories.manage', 'categories-common'), CalendarUrlBuilder::manage_categories()));
     $manage_categories_link->add_sub_link(new AdminModuleLink(LangLoader::get_message('category.add', 'categories-common'), CalendarUrlBuilder::add_category()));
     $tree->add_link($manage_categories_link);
     $manage_events_link = new AdminModuleLink($lang['calendar.manage'], CalendarUrlBuilder::manage_events());
     $manage_events_link->add_sub_link(new AdminModuleLink($lang['calendar.manage'], CalendarUrlBuilder::manage_events()));
     $manage_events_link->add_sub_link(new AdminModuleLink($lang['calendar.titles.add_event'], CalendarUrlBuilder::add_event($year, $month, $day)));
     $tree->add_link($manage_events_link);
     $tree->add_link(new AdminModuleLink(LangLoader::get_message('configuration', 'admin-common'), CalendarUrlBuilder::configuration()));
     if (!AppContext::get_current_user()->check_level(User::ADMIN_LEVEL)) {
         $tree->add_link(new ModuleLink($lang['calendar.titles.add_event'], CalendarUrlBuilder::add_event($year, $month, $day), CalendarAuthorizationsService::check_authorizations()->write() || CalendarAuthorizationsService::check_authorizations()->contribution()));
     }
     $tree->add_link(new ModuleLink($lang['calendar.events_list'], CalendarUrlBuilder::events_list($year, $month, $day), CalendarAuthorizationsService::check_authorizations()->read()));
     $tree->add_link(new ModuleLink($lang['calendar.pending'], CalendarUrlBuilder::display_pending_events(), CalendarAuthorizationsService::check_authorizations()->write() || CalendarAuthorizationsService::check_authorizations()->contribution() || CalendarAuthorizationsService::check_authorizations()->moderation()));
     return $tree;
 }
 private function generate_response()
 {
     $response = new SiteDisplayResponse($this->view);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->lang['calendar.events_list'], $this->lang['module_title']);
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['module_title'], CalendarUrlBuilder::home());
     $breadcrumb->add($this->lang['calendar.events_list'], CalendarUrlBuilder::events_list());
     $graphical_environment->get_seo_meta_data()->set_canonical_url(CalendarUrlBuilder::events_list());
     return $response;
 }