entityManager->getRepository(self::ENTITY)->findAll(); return $this->render('previouslyownedgpu/index.html.twig', [ 'gpus' => $items, ]); } /** * Finds and displays a previouslyOwnedGpu entity. */ #[Route(path: '/{id}', name: 'previously-owned-gpu_show', methods: ['GET'])] public function showAction(PreviouslyOwnedGpu $previouslyOwnedGpu): Response { return $this->itemView($previouslyOwnedGpu, 'previouslyOwnedGpu'); } /** * Displays a form to edit an existing previouslyOwnedGpu entity. * * @throws LogicException */ #[Route(path: '/{id}/edit', name: 'previously-owned-gpu_edit', methods: ['GET', 'POST'])] public function editAction(Request $request, PreviouslyOwnedGpu $previouslyOwnedGpu): RedirectResponse|Response { return $this->itemUpdate($request, $previouslyOwnedGpu, 'previouslyOwnedGpu'); } /** * Moves a Gpu to the previouslyOwned table * * @throws LogicException * @throws ORMInvalidArgumentException */ #[Route(path: '/{id}/reacquire', name: 'previously-owned-gpu_reacquire', methods: ['POST'])] public function reacquireAction(Request $request, PreviouslyOwnedGpu $Gpu): RedirectResponse { return $this->itemReacquire($request, $Gpu, 'gpu_index'); } /** * Creates a form to move * * @param PreviouslyOwnedGpu $Gpu The Gpu entity */ private function createReacquireForm(PreviouslyOwnedGpu $Gpu): FormInterface { return $this->buildForm($Gpu, 'previously-owned-gpu_reacquire', 'POST'); } }