The setEdit method is rarely used as the edit functionality is enabled by default. The common usage is in case you are disabling all the operations and only setting back again the ones that the user has permission of.

The syntax is simple:


Below you can see a full working example to fully understand what the setEdit function is enabling. At the beginning we are disabling all the operations so we can see which functionality the setEdit function is enabling:

$crud->setSubject('Customer', 'Customers');

// Unsetting all the buttons to see the result of the set function


$output = $crud->render();

And the result of the above code is below. As you will also notice only the Update functionality is enabled