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


PHP Request::shouldLoadExpanded方法代码示例

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


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

示例1: getRequestArray

 /**
  * @return array  URL to call the API, eg. "method=Referrers.getKeywords&period=day&date=yesterday"...
  */
 public function getRequestArray()
 {
     // we prepare the array to give to the API Request
     // we setup the method and format variable
     // - we request the method to call to get this specific DataTable
     // - the format = original specifies that we want to get the original DataTable structure itself, not rendered
     $requestArray = array('method' => $this->requestConfig->apiMethodToRequestDataTable, 'format' => 'original');
     $toSetEventually = array('filter_limit', 'keep_summary_row', 'filter_sort_column', 'filter_sort_order', 'filter_excludelowpop', 'filter_excludelowpop_value', 'filter_column', 'filter_pattern', 'flat', 'expanded', 'pivotBy', 'pivotByColumn', 'pivotByColumnLimit');
     foreach ($toSetEventually as $varToSet) {
         $value = $this->getDefaultOrCurrent($varToSet);
         if (false !== $value) {
             $requestArray[$varToSet] = $value;
         }
     }
     $segment = ApiRequest::getRawSegmentFromRequest();
     if (!empty($segment)) {
         $requestArray['segment'] = $segment;
     }
     if (ApiRequest::shouldLoadExpanded()) {
         $requestArray['expanded'] = 1;
     }
     $requestArray = array_merge($requestArray, $this->requestConfig->request_parameters_to_modify);
     if (!empty($requestArray['filter_limit']) && $requestArray['filter_limit'] === 0) {
         unset($requestArray['filter_limit']);
     }
     if ($this->requestConfig->disable_generic_filters) {
         $requestArray['disable_generic_filters'] = '1';
     }
     if ($this->requestConfig->disable_queued_filters) {
         $requestArray['disable_queued_filters'] = 1;
     }
     return $requestArray;
 }
开发者ID:bossrabbit,项目名称:piwik,代码行数:36,代码来源:Request.php

示例2: addBaseDisplayProperties

 protected function addBaseDisplayProperties(ViewDataTable $view)
 {
     $view->config->datatable_js_type = 'ActionsDataTable';
     $view->config->search_recursive = true;
     $view->config->show_table_all_columns = false;
     $view->requestConfig->filter_limit = Actions::ACTIONS_REPORT_ROWS_DISPLAY;
     $view->config->show_all_views_icons = false;
     if ($view->isViewDataTableId(HtmlTable::ID)) {
         $view->config->show_embedded_subtable = true;
     }
     if (Request::shouldLoadExpanded()) {
         if ($view->isViewDataTableId(HtmlTable::ID)) {
             $view->config->show_expanded = true;
         }
         $view->config->filters[] = function ($dataTable) {
             Actions::setDataTableRowLevels($dataTable);
         };
     }
     $view->config->filters[] = function ($dataTable) use($view) {
         if ($view->isViewDataTableId(HtmlTable::ID)) {
             $view->config->datatable_css_class = 'dataTableActions';
         }
     };
 }
开发者ID:piwik,项目名称:piwik,代码行数:24,代码来源:Base.php

示例3: addBaseDisplayProperties

 private function addBaseDisplayProperties(ViewDataTable $view)
 {
     $view->config->datatable_js_type = 'ActionsDataTable';
     $view->config->search_recursive = true;
     $view->config->show_table_all_columns = false;
     $view->requestConfig->filter_limit = self::ACTIONS_REPORT_ROWS_DISPLAY;
     $view->config->show_all_views_icons = false;
     if ($view->isViewDataTableId(HtmlTable::ID)) {
         $view->config->show_embedded_subtable = true;
     }
     // if the flat parameter is not provided, make sure it is set to 0 in the URL,
     // so users can see that they can set it to 1 (see #3365)
     $view->config->custom_parameters = array('flat' => 0);
     if (Request::shouldLoadExpanded()) {
         if ($view->isViewDataTableId(HtmlTable::ID)) {
             $view->config->show_expanded = true;
         }
         $view->config->filters[] = function ($dataTable) {
             Actions::setDataTableRowLevels($dataTable);
         };
     }
     $view->config->filters[] = function ($dataTable) use($view) {
         if ($view->isViewDataTableId(HtmlTable::ID)) {
             $view->config->datatable_css_class = 'dataTableActions';
         }
     };
 }
开发者ID:KiwiJuicer,项目名称:handball-dachau,代码行数:27,代码来源:Actions.php


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