unsetList
unsetList(void)
The method unsetList
is completely removing the list operation for the end-user.
This is useful when you want to use standalone forms for your CRUD. The method will also remove the access to the list
operation from the API, meaning that if the user tries to access the list operation, they will not be able to do so.
The syntax is straightforward. You can find an example below:
$crud->unsetList();
This function is usually combines with the function unsetBackToList
to remove the back to list button from the form
operations (such as create or update form).
You can also see a full working example:
$crud->setTable('customers');
$crud->setSubject('Customer', 'Customers');
$crud->unsetBackToList();
$crud->unsetList();
$output = $crud->render();
You can see the results of the above example here. As you can see by your own, the operation List is completely removed: