addElement($this->createCsrfCounterMeasure(Session::getSession()->getId())); $this->addElement('submit', 'submit', [ 'label' => $this->translate('Delete') ]); } protected function onSuccess(): void { (new DbObjectStore($this->db, $this->branch))->delete($this->object); } }