private function build_response(View $view)
 {
     $body_view = BugtrackerViews::build_body_view($view, 'detail', $this->bug->get_id());
     $response = new SiteDisplayResponse($body_view);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->lang['titles.detail'] . ' #' . $this->bug->get_id(), $this->lang['module_title']);
     $graphical_environment->get_seo_meta_data()->set_canonical_url(BugtrackerUrlBuilder::detail($this->bug->get_id() . '-' . $this->bug->get_rewrited_title()));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['module_title'], BugtrackerUrlBuilder::home());
     $breadcrumb->add($this->lang['titles.detail'] . ' #' . $this->bug->get_id(), BugtrackerUrlBuilder::detail($this->bug->get_id() . '-' . $this->bug->get_rewrited_title()));
     return $response;
 }
 private function build_response(View $view)
 {
     $request = AppContext::get_request();
     $field = $request->get_value('field', 'date');
     $sort = $request->get_value('sort', 'desc');
     $page = $request->get_int('page', 1);
     $filter = $request->get_value('filter', '');
     $filter_id = $request->get_value('filter_id', '');
     $body_view = BugtrackerViews::build_body_view($view, 'unsolved');
     $response = new SiteDisplayResponse($body_view);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->lang['titles.unsolved'], $this->lang['module_title']);
     $graphical_environment->get_seo_meta_data()->set_canonical_url(BugtrackerUrlBuilder::unsolved($field, $sort, $page, $filter, $filter_id));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['module_title'], BugtrackerUrlBuilder::home());
     $breadcrumb->add($this->lang['titles.unsolved'], BugtrackerUrlBuilder::unsolved($field, $sort, $page, $filter, $filter_id));
     return $response;
 }
 private function generate_response(View $tpl)
 {
     $bug = $this->get_bug();
     if ($bug->get_id() === null) {
         $body_view = BugtrackerViews::build_body_view($tpl, 'add');
         $response = new SiteDisplayResponse($body_view);
         $graphical_environment = $response->get_graphical_environment();
         $graphical_environment->set_page_title($this->lang['titles.add'], $this->lang['module_title']);
         $graphical_environment->get_seo_meta_data()->set_canonical_url(BugtrackerUrlBuilder::add());
         $breadcrumb = $graphical_environment->get_breadcrumb();
         $breadcrumb->add($this->lang['module_title'], BugtrackerUrlBuilder::home());
         $breadcrumb->add($this->lang['titles.add'], BugtrackerUrlBuilder::add());
     } else {
         $body_view = BugtrackerViews::build_body_view($tpl, 'edit', $bug->get_id());
         $response = new SiteDisplayResponse($body_view);
         $graphical_environment = $response->get_graphical_environment();
         $graphical_environment->set_page_title($this->lang['titles.edit'] . ' #' . $bug->get_id(), $this->lang['module_title']);
         $graphical_environment->get_seo_meta_data()->set_canonical_url(BugtrackerUrlBuilder::edit($bug->get_id()));
         $breadcrumb = $graphical_environment->get_breadcrumb();
         $breadcrumb->add($this->lang['module_title'], BugtrackerUrlBuilder::home());
         $breadcrumb->add($this->lang['titles.edit'] . ' #' . $bug->get_id(), BugtrackerUrlBuilder::edit($bug->get_id()));
     }
     return $response;
 }
 private function build_response(View $view)
 {
     $versions = array_reverse($this->config->get_versions(), true);
     $request = AppContext::get_request();
     $roadmap_id_version = $request->get_value('id_version', key($versions));
     $roadmap_version = $request->get_value('version', Url::encode_rewrite($versions[key($versions)]['name']));
     $roadmap_status = $request->get_value('status', 'all');
     $field = $request->get_value('field', 'date');
     $sort = $request->get_value('sort', 'desc');
     $page = $request->get_int('page', 1);
     $body_view = BugtrackerViews::build_body_view($view, 'roadmap');
     $response = new SiteDisplayResponse($body_view);
     $graphical_environment = $response->get_graphical_environment();
     $graphical_environment->set_page_title($this->lang['titles.roadmap'], $this->lang['module_title']);
     $graphical_environment->get_seo_meta_data()->set_canonical_url(BugtrackerUrlBuilder::roadmap($roadmap_id_version, $roadmap_version, $roadmap_status, $field, $sort, $page));
     $breadcrumb = $graphical_environment->get_breadcrumb();
     $breadcrumb->add($this->lang['module_title'], BugtrackerUrlBuilder::home());
     $breadcrumb->add($this->lang['titles.roadmap'], BugtrackerUrlBuilder::roadmap($roadmap_id_version, $roadmap_version, $roadmap_status, $field, $sort, $page));
     return $response;
 }