removeResource() public method

Removes a resource
public removeResource ( WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface $resource, boolean $flush = true )
$resource WellCommerce\Bundle\DoctrineBundle\Entity\EntityInterface
$flush boolean
コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function handleDeleteRequest(Request $request, $identifier)
 {
     $resource = $this->getResourceById($identifier);
     $this->manager->removeResource($resource);
     return new JsonResponse(['success' => true, 'identifier' => $identifier, 'resource_type' => $this->getResourceType()]);
 }