/** * Prepare the form for mode delete * * Verifies that the repository contains the entry to delete. * * @throws NotFoundError In case the entry to delete cannot be found */ protected function onDeleteRequest() { $count = $this->repository->select()->from($this->getBaseTable())->addFilter($this->createFilter())->count(); if ($count === 0) { throw new NotFoundError('Entry "%s" not found', $this->getIdentifier()); } }