Piwik\Plugins\Live\ProfileSummary\
Class ProfileSummaryAbstract
This class can be implemented in a plugin to provide a new profile summary
The abstract class defines the following methods:
setProfile()
— Set profile informationgetId()
— Returns the unique IDgetName()
— Returns the descriptive namerender()
— Renders and returns the summarygetOrder()
— Returns order indicator used to sort all summaries before displaying themsetProfile()
Set profile information
It accepts the following parameter(s):
$profile
(array
) —It does not return anything or a mixed result.
getId()
Returns the unique ID
string
value.getName()
Returns the descriptive name
string
value.render()
Renders and returns the summary
Example
public function render() {
if (empty($this->profile['crmData'])) {
return '';
}
$view = new View('@pluginName/summary.twig');
$view->crmData = $this->profile['crmData];
return $view->render();
}
string
value.getOrder()
Returns order indicator used to sort all summaries before displaying them
int
value.