public function deleteAction(int $id) : Response
{
$this->getDoctrineHelper()->disableFilter('locale');
try {
$resource = $this->getManager()->getRepository()->findOneBy(['id' => $id]);
$this->getManager()->removeResource($resource);
} catch (\Exception $e) {
return $this->jsonResponse(['error' => $e->getTraceAsString()]);
}
return $this->jsonResponse(['success' => true]);
}