On this page I found how to add route for my custom action.
protected function configureRoutes(RouteCollection $collection) {
$collection->add(\'ispr
When you are creating service for EntityAdmin
class the third argument is the controller name. You can create a class that extends CRUDController
and set it in service. e.g
The controller,
//Vendor\YourBundle\Controller\EntityAdminController.php
class EntityAdminController extends CRUDController
{
public function ispremiumAction()
{
//process
}
}
In services.yml
,
entity.admin.service:
class: FQCN\Of\EntityAdmin
tags:
- { name: sonata.admin, manager_type: orm, group: your_group, label: Label }
arguments: [null, FQCN\Of\Entity, VendorYourBundle:EntityAdmin]