How to use onDeleteEntry? I currently have a plugin which needs to do things on save and delete entry events. My save entry code is all working perfectly but the onDeleteEntry code doesn't ever fire when I delete an entry.

I have tried using the event both ways mentioned in the documentation

craft()-&gt;entries-&gt;onDeleteEntry = function(Event $event) {
$entry = $event-&gt;params['entry'];
//etc etc
};


and

craft()-&gt;on('entries.deleteEntry', function(Event $event) {
$entry = $event-&gt;params['entry'];
//etc etc
});


both of these are inside the init function.

Does anyone know if there is a particular way this event needs to be used that differs from the onSaveEntry event, which works fine?

Here's a link to the events reference https://craftcms.com/docs/plugins/hooks-and-events#events
I recently found that if your deleting an entry on the entries list, you need to use the onBeforePerformAction event. Then break this down, like J Thomas states on this -

Get the type of action and the elements(s) that an action is being performed on when listening to elements.onPerformAction?