當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilTable2GUI::setExportFormats方法代碼示例

本文整理匯總了PHP中ilTable2GUI::setExportFormats方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilTable2GUI::setExportFormats方法的具體用法?PHP ilTable2GUI::setExportFormats怎麽用?PHP ilTable2GUI::setExportFormats使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilTable2GUI的用法示例。


在下文中一共展示了ilTable2GUI::setExportFormats方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: setExportFormats

 public function setExportFormats()
 {
     parent::setExportFormats(array(self::EXPORT_EXCEL, self::EXPORT_CSV));
 }
開發者ID:JKN-INC,項目名稱:UserDefaults,代碼行數:4,代碼來源:class.ilUDFCheckTableGUI.php


注:本文中的ilTable2GUI::setExportFormats方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。