indigophp / sonata-admin-print-bundle
Allows to print entities
Installs: 534
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=5.4
- sonata-project/admin-bundle: ^2.0 || ^3.0
This package is auto-updated.
Last update: 2021-11-24 09:10:38 UTC
README
Allows to print entities.
Install
Via Composer
$ composer require indigophp/sonata-admin-print-bundle
Usage
First of all you need to be familiar with the process of creating a custom action. See instructions here.
- Use
Indigo\SonataAdminPrintBundle\Admin\PrintAdmin
trait in your custom admin class. - Use
Indigo\SonataAdminPrintBundle\Controller\CRUDPrintController
trait in your custom admin controller. Make sure you pass in the controller name as an argument in the service definition. (Check the above link to learn how to do that) - In the
configureListFields
method configure an action calledprint
. You need to set the template manually toSonataAdminPrintBundle::list__action_print.html.twig
like this:
->add('_action', 'actions', array( 'actions' => array( 'show' => array(), 'edit' => array(), 'delete' => array(), 'print' => array( 'template' => 'SonataAdminPrintBundle::list__action_print.html.twig', ), ) ))
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please contact us at security@indigophp.com.
Credits
License
The MIT License (MIT). Please see License File for more information.