當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。