protected function _post($id = null)
{
$subject = $this->_subject();
$subject->set(['id' => $id]);
$entity = $this->_findRecord($id, $subject);
$event = $this->_trigger('beforeDelete', $subject);
if ($event->isStopped()) {
return $this->_stopped($subject);
}
$method = $this->config('deleteMethod');
if ($this->_table()->{$method}($entity)) {
$this->_success($subject);
} else {
$this->_error($subject);
}
return $this->_redirect($subject, ['action' => 'index']);
}