WellCommerce\Bundle\CoreBundle\Controller\Admin\AbstractAdminController::deleteAction PHP 메소드

deleteAction() 공개 메소드

public deleteAction ( integer $id ) : Response
$id integer
리턴 Symfony\Component\HttpFoundation\Response
    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]);
    }