当前位置: 首页>>代码示例>>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;未经允许,请勿转载。