PHP Class Piwik\Plugins\CoreHome\DataTableRowAction\RowEvolution

ファイルを表示 Open project: piwik/piwik Class Usage Examples

Protected Properties

Property Type Description
$apiMethod The api method to get the data. Format: Plugin.apiAction
$availableMetrics The metrics that are available for the requested report and period
$dataTable Piwik\DataTable The data
$date The requested date
$dimension The name of the dimension of the current report
$graphMetrics The metrics for the graph that has been requested last
$graphType The type of graph that has been requested last
$idSite The current site id
$initiallyShowAllMetrics Whether or not to show all metrics in the evolution graph when to popover opens
$label The label of the requested row
$period The requested period
$rowIcon The icon of the current record
$rowLabel The label of the current record
$segment The request segment

Public Methods

Method Description
__construct ( integer $idSite, Date $date, null | string $graphType = 'graphEvolution' ) The constructor Initialize some local variables from the request
getRowEvolutionGraph ( string | boolean $graphType = false, array | boolean $metrics = false ) : Factory Generic method to get an evolution graph or a sparkline for the row evolution popover.
renderPopover ( Controller $controller, $view ) Render the popover
useAvailableMetrics ( ) Use the available metrics for the metrics of the last requested graph.

Protected Methods

Method Description
extractEvolutionReport ( $report )
extractPrettyLabel ( $report ) : string
getMetricsToggles ( ) : array Prepare metrics toggles with spark lines
getSparkline ( $metric ) Get the img tag for a sparkline showing a single metric
loadEvolutionReport ( $column = false )

Private Methods

Method Description
getFirstAndLastDataPointsForMetric ( $metric )

Method Details

__construct() public method

The constructor Initialize some local variables from the request
public __construct ( integer $idSite, Date $date, null | string $graphType = 'graphEvolution' )
$idSite integer
$date Piwik\Date ($this->date from controller)
$graphType null | string

extractEvolutionReport() protected method

protected extractEvolutionReport ( $report )

extractPrettyLabel() protected method

protected extractPrettyLabel ( $report ) : string
$report
return string

getMetricsToggles() protected method

Prepare metrics toggles with spark lines
protected getMetricsToggles ( ) : array
return array

getRowEvolutionGraph() public method

Do as much as possible from outside the controller.
public getRowEvolutionGraph ( string | boolean $graphType = false, array | boolean $metrics = false ) : Factory
$graphType string | boolean
$metrics array | boolean
return Piwik\ViewDataTable\Factory

getSparkline() protected method

Get the img tag for a sparkline showing a single metric
protected getSparkline ( $metric )

loadEvolutionReport() protected method

protected loadEvolutionReport ( $column = false )

renderPopover() public method

Render the popover
public renderPopover ( Controller $controller, $view )
$controller Piwik\Plugins\CoreHome\Controller

useAvailableMetrics() public method

Use the available metrics for the metrics of the last requested graph.
public useAvailableMetrics ( )

Property Details

$apiMethod protected_oe property

The api method to get the data. Format: Plugin.apiAction
protected $apiMethod

$availableMetrics protected_oe property

The metrics that are available for the requested report and period
protected $availableMetrics

$dataTable protected_oe property

The data
protected DataTable,Piwik $dataTable
return Piwik\DataTable

$date protected_oe property

The requested date
protected $date

$dimension protected_oe property

The name of the dimension of the current report
protected $dimension

$graphMetrics protected_oe property

The metrics for the graph that has been requested last
protected $graphMetrics

$graphType protected_oe property

The type of graph that has been requested last
protected $graphType

$idSite protected_oe property

The current site id
protected $idSite

$initiallyShowAllMetrics protected_oe property

Whether or not to show all metrics in the evolution graph when to popover opens
protected $initiallyShowAllMetrics

$label protected_oe property

The label of the requested row
protected $label

$period protected_oe property

The requested period
protected $period

$rowIcon protected_oe property

The icon of the current record
protected $rowIcon

$rowLabel protected_oe property

The label of the current record
protected $rowLabel

$segment protected_oe property

The request segment
protected $segment