Please explain better what this function would do… deleteConfirmation needs a string (message to be shown)… so I suppose that your function returns the confirmation message…
Note that this value is not evaluated at runtime…
You can use it like
'deleteConfirmation' => $this->xyz(),
Where xyz() is a method in the calling controller that returns a message like
public function xyz()
{
return 'Do you really want to delete this record?';
}