Allows to print entities.
Via Composer
$ composer require indigophp/sonata-admin-print-bundle
First of all you need to be familiar with the process of creating a custom action. See instructions here.
Indigo\SonataAdminPrintBundle\Admin\PrintAdmin
trait in your custom admin class.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)configureListFields
method configure an action called print
. You need to set the template manually to SonataAdminPrintBundle::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',
),
)
))
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please contact us at security@indigophp.com.
The MIT License (MIT). Please see License File for more information.