本文整理汇总了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;
}
示例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';
}
};
}
示例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';
}
};
}