@param int $id

@return Response

@throws EntityNotFoundException
509041
public function deleteAction($id)
    {
        $content = $this->contentManager->getContentById($id);

        if ($content === null) {
            throw EntityNotFoundException::fromClassNameAndIdentifier(
                $this->configurationManager->getEntityClass('content'),
                [$id]
            );
        }

        $this->om->remove($content);
        $this->om->flush();

        return $this->redirectToRoute('sherlockode_acb_content_list');
    }
787403
public function delete($id) {
		$dt = $this->getDataTable();
		
		if (! $dt)
			return $this->createResponse($this->getNameManager()->getTableNames(), 401, "Tabels");
		
		return $this->createResponse([], 200, "{$this->getNameManager()->entityName}: No Delete");
	}
137962
public function getOrFail($id)
    {

        if ($model = $this->get($id)) {
            return $model;
        }

        $typeName = Type::of($this->prototype());

        throw new ResourceNotFoundException("$typeName #$id not found.");
    }
102430
public function load($id)
    {
        $languages = $this->languageMapper->extractLanguagesFromRows(
            $this->languageGateway->loadLanguageListData([$id])
        );

        if (count($languages) < 1) {
            throw new NotFoundException('Language', $id);
        }

        return reset($languages);
    }
128664
protected function getBasket(int $id)
    {
        /** @var Order $order */
        $order = $this->client->basketResource($this->version)
                              ->get($id, ['recalculate' => true]);
        if (is_null($order)) {
            throw new EntityNotFoundException("Can not found basket with id: $id");
        }
        $this->id = (int)$order->id;
        $this->setProperties($order);
    }
13800
public function archive(int $id): PodiumResponse
    {
        $categoryArchiver = $this->getArchiver($id);

        if ($categoryArchiver === null) {
            throw new ModelNotFoundException('Category of given ID can not be found.');
        }

        return $categoryArchiver->archive();
    }
1219724
public function findOrFail(int $id)
    {
        $response = $this->model->with($this->with)->findOrFail($id);
        $this->with = [];
        return $response;
    }
647988
public function show($id, Request $request)
    {
        $entity = $this->getEntityById($id);

        if (!$entity) {
            return $this->response(null, Response::HTTP_NOT_FOUND);
        }

        return $this->response($this->serialize($entity, $request), Response::HTTP_OK);
    }
348936
public function deleteAction($id)
    {
        $delete = function($id) {
            try {
                $this->getManager()->delete($id);
            } catch (TagNotFoundException $tnfe) {
                throw new EntityNotFoundException(self::$entityName, $id);
            }
        };

        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
651326
public function show($id)
    {
        $modelName = $this->modelFullName;
        $model = $modelName::find($id);
        if(!$model) throw new NotFoundException('There is no Resource with id = ' . $id . ' !');
        return $model;
    }
593391
public function remove(int $id): PodiumResponse
    {
        $pollRemover = $this->getRemover($id);

        if ($pollRemover === null) {
            throw new ModelNotFoundException('Poll of given ID can not be found.');
        }

        return $pollRemover->remove();
    }
1293818
public function guardId($id)
    {
        $offer = $this->readRepository->get($id);

        if (is_null($offer)) {
            throw new EntityNotFoundException(
                sprintf('Offer with id: %s not found.', $id)
            );
        }
    }
306138
private function retrieveTargetGroupById($id)
    {
        /** @var TargetGroupInterface $targetGroup */
        $targetGroup = $this->getTargetGroupRepository()->find($id);

        if (!$targetGroup) {
            throw new EntityNotFoundException($this->getTargetGroupRepository()->getClassName(), $id);
        }

        return $targetGroup;
    }
862809
public function entityNotFound(
        EntityRequestInterface $entityRequest,
        ServerRequestInterface $request,
        ResponseInterface $response
    ): ResponseInterface {
        $model = $entityRequest->getTableMap()->getPhpName();
        $pk    = $entityRequest->getPrimaryKey();

        return $this->render(
            $request,
            $response,
            "Entity Not Found",
            404,
            "{$model} #{$pk} not found"
        );
    }
807257
public function getOrFail($id)
    {
        if (!$this->storage->offsetExists($id)) {
            throw new ResourceNotFoundException("Model with id #$id not found.");
        }
        return $this->deserializeFromStorage($this->storage->offsetGet($id));
    }
819620
public function findOrderEntityById($id)
    {
        try {
            return $this->orderRepository->find($id);
        } catch (NoResultException $nre) {
            throw new EntityNotFoundException(static::$orderEntityName, $id);
        }
    }
442903
public function remove(int $id): PodiumResponse
    {
        $rankRemover = $this->getRemover($id);

        if ($rankRemover === null) {
            throw new ModelNotFoundException('Rank of given ID can not be found.');
        }

        return $rankRemover->remove();
    }