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


PHP Piwik_DataTable::getAllTableMetadata方法代码示例

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


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

示例1: postDataTableLoadedFromAPI

 /**
  * Hook called after the dataTable has been loaded from the API
  * Can be used to add, delete or modify the data freshly loaded
  * 
  * @return bool
  */
 protected function postDataTableLoadedFromAPI()
 {
     if (empty($this->dataTable)) {
         return false;
     }
     // deal w/ table metadata
     if ($this->dataTable instanceof Piwik_DataTable) {
         $this->viewProperties['metadata'] = $this->dataTable->getAllTableMetadata();
         if (isset($this->viewProperties['metadata'][Piwik_DataTable::ARCHIVED_DATE_METADATA_NAME])) {
             $this->viewProperties['metadata'][Piwik_DataTable::ARCHIVED_DATE_METADATA_NAME] = $this->makePrettyArchivedOnText();
         }
     }
     // First, filters that delete rows
     foreach ($this->queuedFiltersPriority as $filter) {
         $filterName = $filter[0];
         $filterParameters = $filter[1];
         $this->dataTable->filter($filterName, $filterParameters);
     }
     if (!$this->areGenericFiltersDisabled()) {
         // Second, generic filters (Sort, Limit, Replace Column Names, etc.)
         $requestString = $this->getRequestString();
         $request = Piwik_API_Request::getRequestArrayFromString($requestString);
         if (!empty($this->variablesDefault['enable_sort']) && $this->variablesDefault['enable_sort'] === 'false') {
             $request['filter_sort_column'] = $request['filter_sort_order'] = '';
         }
         $genericFilter = new Piwik_API_DataTableGenericFilter($request);
         $genericFilter->filter($this->dataTable);
     }
     if (!$this->areQueuedFiltersDisabled()) {
         // Finally, apply datatable filters that were queued (should be 'presentation' filters that
         // do not affect the number of rows)
         foreach ($this->queuedFilters as $filter) {
             $filterName = $filter[0];
             $filterParameters = $filter[1];
             $this->dataTable->filter($filterName, $filterParameters);
         }
     }
     return true;
 }
开发者ID:nomoto-ubicast,项目名称:piwik,代码行数:45,代码来源:ViewDataTable.php


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