0

I'm trying to make a custom action but I'm gettin this error:

Controller "Sonata\AdminBundle\Controller\CRUDController::editarDistribucionAction" for URI "/admin/test/tarifas/distribucionperiodos/6/distribucion/editar" is not callable.

I have reviewed the code many times but I can't find the mistake:

This is my custom controller:

class CustomActionsController extends CRUDController
{

    public function editarDistribucionAction(){
        //$id = $request->get($this->admin->getIdParameter());

        //TODO:
    }
}

And this is my services.yml

  sonata.admin.editarDistribucion:
      class: Test\TarifasBundle\Admin\DistribucionPeriodosTablaAdmin
      tags:
          - name: sonata.admin
            manager_type: orm
            group: "Tarifas"
            label: "Distribución de periodos"
      arguments: [ null, Test\TarifasBundle\Entity\DistribucionPeriodosTabla, TarifasBundle:CustomActions ]

I have tried to put wrong parameters on services.yml expecting a different error, but i get exacly the same, so it seems that is ignoring this piece of services.yml

Thanks in advance!!

Carlos
  • 1,411
  • 15
  • 21

1 Answers1

0

It was a concept mistake. I followed the official doc step by step but y was mixing different admin clases. The configureRoutes code was in one class and I was trying to edit another one.

Carlos
  • 1,411
  • 15
  • 21