Property | Type | Description | |
---|---|---|---|
$config | Contains display properties for this visualization. | ||
$requestConfig | Contains request properties for this visualization. |
Property | Type | Description | |
---|---|---|---|
$dataTable | DataTable loaded from the API for this ViewDataTable. | ||
$request | Piwik\ViewDataTable\Request |
Method | Description | |
---|---|---|
__construct ( $controllerAction, $apiMethodToRequestDataTable, $overrideParams = [] ) | Constructor. Initializes display and request properties to their default values. | |
canDisplayViewDataTable ( |
Returns true if this visualization can display some type of data or not. | |
getDataTable ( ) : |
Returns the DataTable loaded from the API. | |
getDefaultConfig ( ) : |
Returns the default config instance. | |
getDefaultRequestConfig ( ) : |
Returns the default request config instance. | |
getNonOverridableParams ( $overrideParams ) : array | ||
getViewDataTableId ( ) : string | Returns the viewDataTable ID for this DataTable visualization. | |
isRequestingSingleDataTable ( ) : boolean | Returns true if this instance will request a single DataTable, false if requesting more than one. | |
isViewDataTableId ( string $viewDataTableId ) : boolean | Returns true if this instance's or any of its ancestors' viewDataTable IDs equals the supplied ID, false if otherwise. | |
render ( ) : string | Requests all needed data and renders the view. | |
setDataTable ( |
To prevent calling an API multiple times, the DataTable can be set directly. | |
throwWhenSettingNonOverridableParameter ( $overrideParams ) | Display a meaningful error message when any invalid parameter is being set. |
Method | Description | |
---|---|---|
checkStandardDataTable ( ) : void | Checks that the API returned a normal DataTable (as opposed to DataTable\Map) | |
getDefaultDataTableCssClass ( ) | ||
getOverridableProperties ( ) : array | Returns the list of view properties that can be overriden by query parameters. | |
getPropertyFromQueryParam ( $name, $defaultValue ) | ||
loadDataTableFromAPI ( ) |
Method | Description | |
---|---|---|
assignRelatedReportsTitle ( ) | ||
overrideViewPropertiesWithParams ( $overrideParams ) | ||
overrideViewPropertiesWithQueryParams ( ) |
public __construct ( $controllerAction, $apiMethodToRequestDataTable, $overrideParams = [] ) |
public static canDisplayViewDataTable ( |
||
$view | Contains the API request being checked. | |
return | boolean |
protected checkStandardDataTable ( ) : void | ||
return | void |
public getDataTable ( ) : |
||
return |
public static getDefaultConfig ( ) : |
||
return |
public static getDefaultRequestConfig ( ) : |
||
return |
public getNonOverridableParams ( $overrideParams ) : array | ||
$overrideParams | ||
return | array |
protected getOverridableProperties ( ) : array | ||
return | array |
protected getPropertyFromQueryParam ( $name, $defaultValue ) |
public static getViewDataTableId ( ) : string | ||
return | string |
public isRequestingSingleDataTable ( ) : boolean | ||
return | boolean |
public isViewDataTableId ( string $viewDataTableId ) : boolean | ||
$viewDataTableId | string | The viewDataTable ID to check for, eg, `'table'`. |
return | boolean |
public setDataTable ( |
||
$dataTable | The DataTable to use. | |
return | void |
public throwWhenSettingNonOverridableParameter ( $overrideParams ) | ||
$overrideParams |
public Config,Piwik\ViewDataTable $config | ||
return |
protected DataTable,Piwik $dataTable | ||
return |
protected Request,Piwik\ViewDataTable $request | ||
return | Piwik\ViewDataTable\Request |