當前位置: 首頁>>代碼示例>>PHP>>正文


PHP H::breadcrumb方法代碼示例

本文整理匯總了PHP中H::breadcrumb方法的典型用法代碼示例。如果您正苦於以下問題:PHP H::breadcrumb方法的具體用法?PHP H::breadcrumb怎麽用?PHP H::breadcrumb使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在H的用法示例。


在下文中一共展示了H::breadcrumb方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: edit

 public function edit()
 {
     if (!isset($this->request->get['id'])) {
         throw new BaseException(t('error_empty_values_passed'));
     }
     $id = (int) $this->request->get['id'];
     $this->load->model('album');
     $album = $this->album_model->read($id);
     $data = array();
     $data['content'] = $this->load->view('album/pictures', array('result' => $album['pictures']));
     $data['sidebar_right'] = H::saveButton(DIR_SITE . $this->site . '/database.db') . $this->load->view('album/album', array('result' => $album['data']));
     $data['form_url'] = '?route=album/save';
     $data['meta_title'] = t('module_' . $this->name);
     $data['breadcrumbs'] = H::breadcrumb(array(array('url' => '?route=' . $this->name, 'title' => t('module_' . $this->name)), array('title' => t('editing'))));
     $this->response->data = $data;
     $this->response->style[] = '/system/module/album/assets/album.css';
     $this->response->script[] = '/system/module/album/assets/album.js';
 }
開發者ID:artygrand,項目名稱:sydes-module-album,代碼行數:18,代碼來源:index.php

示例2: index

 public function index()
 {
     $this->addContextMenu('columns', t('count_of_columns'));
     $this->addToContextMenu('columns', array('title' => '1', 'link' => '?route=dashboard/columns&q=1'));
     $this->addToContextMenu('columns', array('title' => '2', 'link' => '?route=dashboard/columns&q=2'));
     $this->addToContextMenu('columns', array('title' => '3', 'link' => '?route=dashboard/columns&q=3'));
     $this->addToContextMenu('columns', array('title' => '4', 'link' => '?route=dashboard/columns&q=4'));
     $widgets = $this->config->get('widgets');
     $exists = str_replace(array(DIR_SYS . 'widget/', '.php'), '', glob(DIR_SYS . 'widget/' . '*.php'));
     $used = array();
     foreach ($widgets as $i => $column) {
         foreach ($column as $j => $widget) {
             if (in_array($widget, $exists)) {
                 $widgets[$i][$j] = $this->loadWidget($widget);
                 $used[] = $widget;
             } else {
                 unset($widgets[$i][$j]);
             }
         }
     }
     if (isset($used)) {
         $unused = array_diff($exists, $used);
         if (!empty($unused)) {
             $unused = $this->getWidgetNames($unused);
         }
     } else {
         $unused = $this->getWidgetNames($exists);
     }
     if (!empty($unused)) {
         $this->addContextMenu('widgets', t('add_widget'));
         foreach ($unused as $widget => $name) {
             $this->addToContextMenu('widgets', array('title' => $name, 'link' => '?route=dashboard/add&widget=' . $widget));
         }
     }
     $data = array();
     $data['content'] = $this->load->view('dashboard/dashboard', array('col_sm' => 12 / count($widgets), 'columns' => $widgets));
     if (count($widgets) < 3) {
         $data['sidebar_left'] = $data['sidebar_right'] = ' ';
     }
     $data['meta_title'] = t('module_dashboard');
     $crumbs = array(array('title' => t('module_dashboard')));
     $data['breadcrumbs'] = H::breadcrumb($crumbs);
     $this->response->data = $data;
 }
開發者ID:artygrand,項目名稱:sydes-module-dashboard,代碼行數:44,代碼來源:index.php


注:本文中的H::breadcrumb方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。