Exemple #1
0
 protected function set_title_and_breadcrumbs($title = array(), $middle_breadcrumbs = array(), $member_obj = null, $module = null, $info = array(), $is_no_breadcrumbs = false, $is_no_title = false, $ogp_data = array())
 {
     $common = array('title' => FBD_SITE_NAME, 'description' => FBD_SITE_DESCRIPTION);
     $title_name = '';
     $this->template->title = '';
     if ($title) {
         list($title_name, $title_label) = Site_Controller::get_title_parts($title);
     }
     if (!$is_no_title && $title_name) {
         $this->template->title = View::forge('_parts/page_title', array('name' => $title_name, 'label' => $title_label));
         $common['title'] = $title_name;
     }
     $this->template->header_title = site_title($title_name);
     if ($info) {
         $this->template->header_info = View::forge('_parts/information', $info);
     }
     $this->template->breadcrumbs = $is_no_breadcrumbs ? array() : static::get_breadcrumbs($title_name, $middle_breadcrumbs, $member_obj, $member_obj ? $this->check_is_mypage($member_obj->id) : false, $module);
     if (!empty($ogp_data['title'])) {
         $common['title'] = $ogp_data['title'];
     }
     if (!empty($ogp_data['description'])) {
         $common['description'] = $ogp_data['description'];
     }
     if (!empty($ogp_data['image'])) {
         $common['image'] = $ogp_data['image'];
     }
     View::set_global('common', $common);
 }