ProfileSummaryAbstract
This documentation is for an outdated Matomo version.
Click here if you want to read this article for the latest version.
Click here if you want to read this article for the latest version.
Piwik\Plugins\Live\ProfileSummary\
ProfileSummaryAbstract
Class ProfileSummaryAbstract
This class can be implemented in a plugin to provide a new profile summary
Methods
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 them
setProfile()
Set profile information
Signature
It accepts the following parameter(s):
$profile(array) —
It does not return anything or a mixed result.
getId()
Returns the unique ID
Signature
- It returns a
stringvalue.
getName()
Returns the descriptive name
Signature
- It returns a
stringvalue.
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();
}
Signature
- It returns a
stringvalue.
getOrder()
Returns order indicator used to sort all summaries before displaying them
Signature
- It returns a
intvalue.