I wrote a code to list data taken from a simple database and there I put an action to edit data. When I click on this Edit button, it goes to the default "Edit" page. There is a button called "delete" there. I want to remove that button...
I wrote a code to list data taken from a simple database and there I put an action to edit data. When I click on this Edit button, it goes to the default "Edit" page. There is a button called "delete" there. I want to remove that button...
Firstly use the class RouteCollection in your CustomClassAdmin :
use Sonata\AdminBundle\Route\RouteCollection;
and add the following code:
public function configureRoutes(RouteCollection $collection)
{
$collection->remove('delete');
}