protected function performAdditionalDeleteAction($deleteEvent)
    {
        if ($deleteEvent->getProductCount() > 0) {
            $this->getParserContext()->setGeneralError(
                $this->getTranslator()->trans(
                    "This template is in use in some of your products, and cannot be deleted. Delete it from all your products and try again."
                )
            );

            return $this->renderList();
        }

        // Normal delete processing
        return null;
    }