PHP Class Piwik\Plugins\CoreHome\DataTableRowAction\RowEvolution

Show file 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 property

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

$availableMetrics protected property

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

$dataTable protected property

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

$date protected property

The requested date
protected $date

$dimension protected property

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

$graphMetrics protected property

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

$graphType protected property

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

$idSite protected property

The current site id
protected $idSite

$initiallyShowAllMetrics protected property

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

$label protected property

The label of the requested row
protected $label

$period protected property

The requested period
protected $period

$rowIcon protected property

The icon of the current record
protected $rowIcon

$rowLabel protected property

The label of the current record
protected $rowLabel

$segment protected property

The request segment
protected $segment