当前位置: 首页>>代码示例>>PHP>>正文


PHP AphrontPagerView::setEnableKeyboardShortcuts方法代码示例

本文整理汇总了PHP中AphrontPagerView::setEnableKeyboardShortcuts方法的典型用法代码示例。如果您正苦于以下问题:PHP AphrontPagerView::setEnableKeyboardShortcuts方法的具体用法?PHP AphrontPagerView::setEnableKeyboardShortcuts怎么用?PHP AphrontPagerView::setEnableKeyboardShortcuts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AphrontPagerView的用法示例。


在下文中一共展示了AphrontPagerView::setEnableKeyboardShortcuts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: processRequest

 public function processRequest()
 {
     $request = $this->getRequest();
     $conn_table = new PhabricatorConduitConnectionLog();
     $call_table = new PhabricatorConduitMethodCallLog();
     $conn_r = $call_table->establishConnection('r');
     $pager = new AphrontPagerView();
     $pager->setOffset($request->getInt('page'));
     $calls = $call_table->loadAllWhere('1 = 1 ORDER BY id DESC LIMIT %d, %d', $pager->getOffset(), $pager->getPageSize() + 1);
     $calls = $pager->sliceResults($calls);
     $pager->setURI(new PhutilURI('/conduit/log/'), 'page');
     $pager->setEnableKeyboardShortcuts(true);
     $min = $pager->getOffset() + 1;
     $max = $min + count($calls) - 1;
     $conn_ids = array_filter(mpull($calls, 'getConnectionID'));
     $conns = array();
     if ($conn_ids) {
         $conns = $conn_table->loadAllWhere('id IN (%Ld)', $conn_ids);
     }
     $table = $this->renderCallTable($calls, $conns);
     $panel = new AphrontPanelView();
     $panel->setHeader('Conduit Method Calls (' . $min . '-' . $max . ')');
     $panel->appendChild($table);
     $panel->appendChild($pager);
     $this->setShowSideNav(false);
     return $this->buildStandardPageResponse($panel, array('title' => 'Conduit Logs'));
 }
开发者ID:nexeck,项目名称:phabricator,代码行数:27,代码来源:PhabricatorConduitLogController.php

示例2: processRequest

 public function processRequest()
 {
     $request = $this->getRequest();
     $nav = new AphrontSideNavView();
     $links = array('calls' => 'All Calls');
     if (empty($links[$this->view])) {
         $this->view = key($links);
     }
     foreach ($links as $slug => $name) {
         $nav->addNavItem(phutil_render_tag('a', array('href' => '/conduit/log/view/' . $slug . '/', 'class' => $slug == $this->view ? 'aphront-side-nav-selected' : null), phutil_escape_html($name)));
     }
     $conn_table = new PhabricatorConduitConnectionLog();
     $call_table = new PhabricatorConduitMethodCallLog();
     $conn_r = $call_table->establishConnection('r');
     $pager = new AphrontPagerView();
     $pager->setOffset($request->getInt('page'));
     $calls = $call_table->loadAllWhere('1 = 1 ORDER BY id DESC LIMIT %d, %d', $pager->getOffset(), $pager->getPageSize() + 1);
     $calls = $pager->sliceResults($calls);
     $pager->setURI(new PhutilURI('/conduit/log/view/' . $this->view . '/'), 'page');
     $pager->setEnableKeyboardShortcuts(true);
     $min = $pager->getOffset() + 1;
     $max = $min + count($calls) - 1;
     $conn_ids = array_filter(mpull($calls, 'getConnectionID'));
     $conns = array();
     if ($conn_ids) {
         $conns = $conn_table->loadAllWhere('id IN (%Ld)', $conn_ids);
     }
     $table = $this->renderCallTable($calls, $conns);
     $panel = new AphrontPanelView();
     $panel->setHeader('Conduit Method Calls (' . $min . '-' . $max . ')');
     $panel->appendChild($table);
     $panel->appendChild($pager);
     $nav->appendChild($panel);
     return $this->buildStandardPageResponse($nav, array('title' => 'Conduit Logs', 'tab' => 'logs'));
 }
开发者ID:netcomtec,项目名称:phabricator,代码行数:35,代码来源:PhabricatorConduitLogController.php


注:本文中的AphrontPagerView::setEnableKeyboardShortcuts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。