This plugin add data reports to the Sylius administration interface. It is highly inspired on the past SyliusReportBundle bundle and Report component using its good architecture.
Basically you have a DataFetcherInterface and RendererInterface interfaces. The first one defines how to fetch the Data according on a configuration provided. And the second one uses the Data returned by the fetcher and returns a rendered view.
Some DataFetchers and Renderers come with this plugin but you can create your own by implementing their interfaces.
You can see this plugin in action in our Sylius Demo application.
- Frontend: sylius-demo.odiseo.com.ar.
- Administration: sylius-demo.odiseo.com.ar/admin with
odiseo: odiseocredentials. Next, you can enter to the reports page.
-
Run
composer require odiseoteam/sylius-report-plugin. -
Add the plugin to the AppKernel but add it before SyliusResourceBundle. To do that you need change the registerBundles like this:
public function registerBundles(): array
{
$preResourceBundles = [
new \Odiseo\SyliusReportPlugin\OdiseoSyliusReportPlugin(),
];
$bundles = [
...
];
return array_merge($preResourceBundles, parent::registerBundles(), $bundles);
}- Import the configurations on your config.yml:
- { resource: "@OdiseoSyliusReportPlugin/Resources/config/config.yml" }- Add the admin routes:
odiseo_sylius_report_plugin_admin:
resource: "@OdiseoSyliusReportPlugin/Resources/config/routing/admin.yml"
prefix: /admin- Finish the installation updatating the database schema and installing assets:
php bin/console doctrine:schema:update --force
php bin/console assets:install
php bin/console sylius:theme:assets:install
You can follow the instructions to test this plugins in the proper documentation page: Test the plugin.
This plugin is maintained by Odiseo. Want us to help you with this plugin or any Sylius project? Contact us on team@odiseo.com.ar.
