Custom Reports is a report engine directly integrated into Pimcore. With Custom Reports it is possible to create tabular or chart reports (or both) with further filtering and export functionality.
The data source for the reports is always a source adapter which is responsible for retrieving and preparing the report data. Currently two adapters ship with Pimcore:
- SQL: Retrieve Data based on a SQL statement
- Google Analytics: Retrieve Data from Google Analytics
Custom Data Source Adapters
It is easily possible to implement custom source adapters for special use cases. To do so following steps are necessary:
pimcore.report.custom.definition, named like the adapter (e.g.
pimcore.report.custom.definition.mySource) and implement the methods
getValues. As sample see analytics
- PHP Class: This class is the server side implementation of the adapter. It is responsible for retrieving and preparing
the options, columns and data. It has to be located in the namespace
Pimcore\Model\Tool\CustomReport\Adapter, named like the adapter (e.g.
MySource) and extend the abstract class
Pimcore\Model\Tool\CustomReport\Adapter\AbstractAdapter. As sample see analytics adapter.