The method unsetOperations is removing completely any of the operations for the end-user.

The syntax is simple. You can find an example below:


The above line is exactly the same as:


More specifically the unsetOperations:

  1. is removing the button "Add", "Edit", "View" and "Delete"
  2. is removing any operation that has to do with the 'Add', 'Edit', 'Read' and 'Delete'
  3. The user doesn't have the ability to do any operation of add, edit or delete even if they try to do it by having the URL of the API (e.g. the permission is not allowed)

You can also see a full working example:

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

$output = $crud->render();

You can see the results of the above example here. As you can see by your own the end-user can only see the datagrid and have the ability to print or export. Rather than that any other operation is not allowed to the user