当前位置: 首页>>代码示例>>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;未经允许,请勿转载。