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


PHP ilTable2GUI::setLimit方法代码示例

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


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

示例1: prepareTable

 /**
  * @param ilTable2GUI $table_gui
  */
 private function prepareTable(ilTable2GUI $table_gui)
 {
     global $lng;
     $table_gui->addColumn($lng->txt('toplist_col_rank'));
     $table_gui->addColumn($lng->txt('toplist_col_participant'));
     if ($this->object->getHighscoreAchievedTS()) {
         $table_gui->addColumn($lng->txt('toplist_col_achieved'));
     }
     if ($this->object->getHighscoreScore()) {
         $table_gui->addColumn($lng->txt('toplist_col_score'));
     }
     if ($this->object->getHighscorePercentage()) {
         $table_gui->addColumn($lng->txt('toplist_col_percentage'));
     }
     if ($this->object->getHighscoreHints()) {
         $table_gui->addColumn($lng->txt('toplist_col_hints'));
     }
     if ($this->object->getHighscoreWTime()) {
         $table_gui->addColumn($lng->txt('toplist_col_wtime'));
     }
     $table_gui->setEnableNumInfo(false);
     $table_gui->setLimit(10);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:26,代码来源:class.ilTestToplistGUI.php

示例2: statisticsObject

 /**
  * Print out statistics about the language
  */
 function statisticsObject()
 {
     $modules = ilObjLanguageExt::_getModules($this->object->key);
     $data = array();
     $total = array("module" => '', "all" => 0, "changed" => 0, "unchanged" => 0);
     foreach ($modules as $module) {
         $row = array();
         $row['module'] = $module;
         $row['all'] = count($this->object->getAllValues(array($module)));
         $row['changed'] = count($this->object->getChangedValues(array($module)));
         $row['unchanged'] = $row['all'] - $row['changed'];
         $total['all'] += $row['all'];
         $total['changed'] += $row['changed'];
         $total['unchanged'] += $row['unchanged'];
         $data[] = $row;
     }
     $total['module'] = "<b>" . $this->lng->txt("language_all_modules") . "</b>";
     $total['all'] = "<b>" . $total['all'] . "</b>";
     $total['changed'] = "<b>" . $total['changed'] . "</b>";
     $total['unchanged'] = "<b>" . $total['unchanged'] . "</b>";
     $data[] = $total;
     // create and configure the table object
     include_once 'Services/Table/classes/class.ilTable2GUI.php';
     $table_gui = new ilTable2GUI($this, "statistics");
     $table_gui->setRowTemplate("tpl.lang_statistics_row.html", "Services/Language");
     $table_gui->setEnableTitle(false);
     $table_gui->setEnableNumInfo(false);
     $table_gui->setLimit(count($data));
     $table_gui->setExportFormats(array(ilTable2GUI::EXPORT_EXCEL));
     $table_gui->addColumn(ucfirst($this->lng->txt("module")), "", "25%");
     $table_gui->addColumn($this->lng->txt("language_scope_global"), "", "25%");
     $table_gui->addColumn($this->lng->txt("language_scope_local"), "", "25%");
     $table_gui->addColumn($this->lng->txt("language_scope_unchanged"), "", "25%");
     $table_gui->setData($data);
     $this->tpl->setContent($table_gui->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilObjLanguageExtGUI.php

示例3: showFileSearchResult

 /**
  * Shows $results in a table
  *
  * @param array $results
  * @access public
  */
 public function showFileSearchResult($results = null)
 {
     global $tree;
     if (!$results && isset($_SESSION['contents']['search_result'])) {
         // this is for table sorting
         $results = $_SESSION['contents']['search_result'];
     }
     if (!$results) {
         return $this->showAddContent();
     }
     include_once 'Services/Table/classes/class.ilTable2GUI.php';
     $this->tabs->activateTab('contents');
     $table = new ilTable2GUI($this, 'showFileSearchResult');
     $table->setLimit(2147483647);
     $table->setTitle($this->txt('files'));
     $table->setDefaultOrderField('path');
     $table->addColumn('', '', '1%', true);
     $table->addColumn($this->txt('title'), 'title', '30%');
     $table->addColumn($this->lng->txt('path'), 'path', '70%');
     $table->setFormAction($this->ctrl->getFormAction($this, 'addContentFromILIAS'));
     $table->setRowTemplate('tpl.content_file_row.html', $this->pluginObj->getDirectory());
     $table->setId('xavc_cs_' . $this->object->getId());
     $table->setPrefix('xavc_cs_' . $this->object->getId());
     $table->addCommandButton('addContentFromILIAS', $this->txt('add'));
     $table->addCommandButton('cancelSearchContentFile', $this->txt('cancel'));
     $data = array();
     $i = 0;
     foreach ($results as $file_id) {
         $title = ilObject::_lookupTitle($file_id);
         $file_ref = array_shift(ilObject::_getAllReferences($file_id));
         $path_arr = $tree->getPathFull($file_ref);
         $counter = 0;
         $path = '';
         foreach ($path_arr as $element) {
             if ($counter++) {
                 $path .= " > ";
                 $path .= $element['title'];
             } else {
                 $path .= $this->lng->txt('repository');
             }
         }
         $data[$i]['check_box'] = ilUtil::formRadioButton(0, 'file_id', $file_id);
         $data[$i]['title'] = $title;
         $data[$i]['path'] = $path;
         ++$i;
     }
     $table->setData($data);
     $this->tpl->setContent($table->getHTML());
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:55,代码来源:class.ilObjAdobeConnectGUI.php

示例4: moveThreadsObject

 public function moveThreadsObject()
 {
     /**
      * @var $lng ilLanguage
      * @var $ilToolbar ilToolbarGUI
      * @var $tree ilTree
      */
     global $lng, $ilToolbar, $tree;
     if (!$this->is_moderator) {
         $this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
     }
     $threads2move = $_SESSION['threads2move'];
     if (empty($threads2move)) {
         ilUtil::sendInfo($this->lng->txt('select_at_least_one_thread'), true);
         $this->ctrl->redirect($this, 'showThreads');
     }
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.forums_threads_move.html', 'Modules/Forum');
     if (!$this->hideToolbar()) {
         $ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this));
     }
     $tblThr = new ilTable2GUI($this);
     $tblThr->setId('il_frm_thread_move_table_' . $this->object->getRefId());
     $tblThr->setTitle($this->lng->txt('move_chosen_topics'));
     $tblThr->addColumn($this->lng->txt('subject'), 'top_name', '100%');
     $tblThr->disable('header');
     $tblThr->disable('footer');
     $tblThr->disable('linkbar');
     $tblThr->disable('sort');
     $tblThr->disable('linkbar');
     $tblThr->setLimit(0);
     $tblThr->setRowTemplate('tpl.forums_threads_move_thr_row.html', 'Modules/Forum');
     $tblThr->setDefaultOrderField('is_sticky');
     $counter = 0;
     $result = array();
     foreach ($threads2move as $thr_pk) {
         $objCurrentTopic = new ilForumTopic($thr_pk, $this->is_moderator);
         $result[$counter]['num'] = $counter + 1;
         $result[$counter]['thr_subject'] = $objCurrentTopic->getSubject();
         unset($objCurrentTopic);
         ++$counter;
     }
     $tblThr->setData($result);
     $this->tpl->setVariable('THREADS_TABLE', $tblThr->getHTML());
     // selection tree
     require_once 'Modules/Forum/classes/class.ilForumMoveTopicsExplorer.php';
     $exp = new ilForumMoveTopicsExplorer($this->ctrl->getLinkTarget($this, 'moveThreads'), 'frm_topic_paste_expand');
     $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'moveThreads'));
     $exp->setTargetGet('ref_id');
     $exp->setPostVar('frm_ref_id');
     $exp->excludeObjIdFromSelection($this->object->getId());
     $exp->setCheckedItem(isset($_POST['frm_ref_id']) && (int) $_POST['frm_ref_id'] ? (int) $_POST['frm_ref_id'] : 0);
     // open current position in tree
     if (!is_array($_SESSION['frm_topic_paste_expand'])) {
         $_SESSION['frm_topic_paste_expand'] = array();
         $path = $tree->getPathId($this->object->getRefId());
         foreach ((array) $path as $node_id) {
             if (!in_array($node_id, $_SESSION['frm_topic_paste_expand'])) {
                 $_SESSION['frm_topic_paste_expand'][] = $node_id;
             }
         }
     }
     if (!isset($_GET['frm_topic_paste_expand']) || $_GET['frm_topic_paste_expand'] == '') {
         $expanded = $tree->readRootId();
     } else {
         $expanded = $_GET['frm_topic_paste_expand'];
     }
     $exp->setExpand($expanded);
     // build html-output
     $exp->setOutput(0);
     $output = $exp->getOutput();
     $this->tpl->setVariable('FRM_SELECTION_TREE', $output);
     $this->tpl->setVariable('CMD_SUBMIT', 'performMoveThreads');
     $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('move'));
     $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this, 'performMoveThreads'));
     return true;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:76,代码来源:class.ilObjForumGUI.php

示例5: moveThreadsObject

 public function moveThreadsObject()
 {
     /**
      * @var $lng ilLanguage
      * @var $ilToolbar ilToolbarGUI
      * @var $tree ilTree
      */
     global $lng, $ilToolbar, $tree;
     if (!$this->is_moderator) {
         $this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
     }
     $threads2move = $_SESSION['threads2move'];
     if (!count($threads2move)) {
         ilUtil::sendInfo($this->lng->txt('select_at_least_one_thread'), true);
         $this->ctrl->redirect($this, 'showThreads');
     }
     require_once 'Modules/Forum/classes/class.ilForumMoveTopicsExplorer.php';
     $exp = new ilForumMoveTopicsExplorer($this, 'moveThreads');
     $exp->setPathOpen($this->object->getRefId());
     $exp->setNodeSelected(isset($_POST['frm_ref_id']) && (int) $_POST['frm_ref_id'] ? (int) $_POST['frm_ref_id'] : 0);
     $exp->setCurrentFrmRefId($this->object->getRefId());
     $exp->setHighlightedNode($this->object->getRefId());
     if (!$exp->handleCommand()) {
         $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.forums_threads_move.html', 'Modules/Forum');
         if (!$this->hideToolbar()) {
             $ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this));
         }
         $tblThr = new ilTable2GUI($this);
         $tblThr->setId('il_frm_thread_move_table_' . $this->object->getRefId());
         $tblThr->setTitle($this->lng->txt('move_chosen_topics'));
         $tblThr->addColumn($this->lng->txt('subject'), 'top_name', '100%');
         $tblThr->disable('header');
         $tblThr->disable('footer');
         $tblThr->disable('linkbar');
         $tblThr->disable('sort');
         $tblThr->disable('linkbar');
         $tblThr->setLimit(PHP_INT_MAX);
         $tblThr->setRowTemplate('tpl.forums_threads_move_thr_row.html', 'Modules/Forum');
         $tblThr->setDefaultOrderField('is_sticky');
         $counter = 0;
         $result = array();
         foreach ($threads2move as $thr_pk) {
             $objCurrentTopic = new ilForumTopic($thr_pk, $this->is_moderator);
             $result[$counter]['num'] = $counter + 1;
             $result[$counter]['thr_subject'] = $objCurrentTopic->getSubject();
             unset($objCurrentTopic);
             ++$counter;
         }
         $tblThr->setData($result);
         $this->tpl->setVariable('THREADS_TABLE', $tblThr->getHTML());
         $this->tpl->setVariable('FRM_SELECTION_TREE', $exp->getHTML());
         $this->tpl->setVariable('CMD_SUBMIT', 'performMoveThreads');
         $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('move'));
         $this->tpl->setVariable('FORMACTION', $this->ctrl->getFormAction($this, 'performMoveThreads'));
     }
     return true;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:57,代码来源:class.ilObjForumGUI.php


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