protected function onRequest() { parent::onRequest(); if ($this->getSentValue('delete') === $this->translate('Delete')) { $this->object()->delete(); $this->setSuccessUrl($this->getSuccessUrl()->without('field_id')); $this->redirectOnSuccess($this->translate('Field has been removed')); } }