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


PHP History::getLast方法代码示例

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


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

示例1: action_history

 public function action_history()
 {
     $data = array('content' => $this->executeCommand(), 'currentdb' => Request::factory()->getDb(), 'cmd' => Request::factory()->getCmd(), 'dbkeys' => Helper_Info::getCountKeysInDb(), 'history' => History::getLast($_SESSION['login']));
     if (Request::factory()->getAjax()) {
         header('Content-Type: application/json');
         echo json_encode($data);
     } else {
         echo View::factory('layout', $data);
     }
 }
开发者ID:xingcuntian,项目名称:readmin,代码行数:10,代码来源:Index.php

示例2: testPositioning

 public function testPositioning()
 {
     $other_file = tempnam(sys_get_temp_dir() . 'tmp', 'history');
     $el1 = $this->_history->append($other_file);
     $el2 = $this->_history->append($other_file);
     $el3 = $this->_history->append($other_file);
     $this->assertEquals(3, $this->_history->getCount());
     $this->assertEquals($el3, $this->_history->getFirst());
     $this->assertEquals($el1, $this->_history->getLast());
     $this->assertEquals($el2, $this->_history->getNth(1));
     $this->assertEquals($el1, $this->_history->getNext());
     $this->assertFalse($this->_history->getNext());
     unlink($other_file);
 }
开发者ID:jgera,项目名称:sugarcrm_dev,代码行数:14,代码来源:HistoryTest.php

示例3: preview

 function preview()
 {
     global $mod_strings;
     if (!isset($_REQUEST['sid'])) {
         die('SID Required');
     }
     $sid = $_REQUEST['sid'];
     $subpanel = '';
     if (!empty($_REQUEST['subpanel'])) {
         $subpanel = ',"' . $_REQUEST['subpanel'] . '"';
     }
     $isDefault = $sid == $this->history->getLast();
     echo "<input type='button' name='close{$sid}' value='" . translate('LBL_BTN_CLOSE') . "' " . "class='button' onclick='ModuleBuilder.tabPanel.removeTab(ModuleBuilder.tabPanel.get(\"activeTab\"));' style='margin:5px;'>" . "<input type='button' name='restore{$sid}' value='" . translate('LBL_MB_RESTORE') . "' " . "class='button' onclick='ModuleBuilder.history.revert(\"{$this->module}\",\"{$this->layout}\",\"{$sid}\",\"{$subpanel}\",\"{$isDefault}\");' style='margin:5px;'>";
     $this->history->restoreByTimestamp($sid);
     if ($this->layout == 'listview') {
         require_once "modules/ModuleBuilder/views/view.listview.php";
         $view = new ViewListView();
     } else {
         if ($this->layout == 'basic_search' || $this->layout == 'advanced_search') {
             require_once "modules/ModuleBuilder/views/view.searchview.php";
             $view = new ViewSearchView();
         } else {
             if ($this->layout == 'dashlet' || $this->layout == 'dashletsearch') {
                 require_once "modules/ModuleBuilder/views/view.dashlet.php";
                 $view = new ViewDashlet();
             } else {
                 if ($this->layout == 'popuplist' || $this->layout == 'popupsearch' || $this->layout == 'selection-list') {
                     require_once "modules/ModuleBuilder/views/view.popupview.php";
                     $view = new ViewPopupview();
                 } else {
                     require_once "modules/ModuleBuilder/views/view.layoutview.php";
                     $view = new ViewLayoutView();
                 }
             }
         }
     }
     $view->display(true);
     $this->history->undoRestore();
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:39,代码来源:view.history.php


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