Delete & Undo Records - lokothodida/DM_Matrix GitHub Wiki
Deletion
Within The Matrix
Find the desired record from the table view. On the right hand side of its row you will see an 'x'. Click it, agree to the prompt and the record will be deleted.
Outside The Matrix
Method deleteRecord will do the job, so long as you know the record id.
Example
<?php
$table = 'foo';
$id = 0;
$var->deleteRecord($table, $id);
?>
Undo
Any time that you delete a record, a copy of the record's schema will be saved into the current session (which is flushed once you close the browser). If the record's schema is there in the session, you can undo the latest change to that record.
Within The Matrix
Once the record has been deleted, you will see the success message and an 'Undo' option. Click it and the record will be restored.
Outside The Matrix
Example
<?php
$table = 'foo';
$id = 0;
$var->undoRecord($table, $id);
?>