62 lines
1.9 KiB
PHP
62 lines
1.9 KiB
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace App\Controller;
|
|
|
|
use App\Entity\PreviouslyOwnedFlash;
|
|
use App\Form\PreviouslyOwnedFlashType;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
/**
|
|
* Previouslyownedflash controller.
|
|
*
|
|
* @Route("previously-owned-flash")
|
|
*/
|
|
class PreviouslyOwnedFlashController extends AbstractController
|
|
{
|
|
use FormControllerTrait;
|
|
|
|
protected const ENTITY = PreviouslyOwnedFlash::class;
|
|
protected const FORM = PreviouslyOwnedFlashType::class;
|
|
/**
|
|
* Lists all previouslyOwnedFlash entities.
|
|
*
|
|
* @Route("/", name="previously-owned-flash_index", methods={"GET"})
|
|
*/
|
|
public function indexAction()
|
|
{
|
|
return $this->itemListView('previouslyownedflash/index.html.twig', 'previouslyOwnedFlashes');
|
|
}
|
|
|
|
/**
|
|
* Creates a new previouslyOwnedFlash entity.
|
|
*
|
|
* @Route("/new", name="previously-owned-flash_new", methods={"GET", "POST"})
|
|
*/
|
|
public function newAction(Request $request)
|
|
{
|
|
return $this->itemCreate($request, 'previouslyownedflash/new.html.twig', 'previouslyOwnedFlash', 'previously-owned-flash_show');
|
|
}
|
|
|
|
/**
|
|
* Finds and displays a previouslyOwnedFlash entity.
|
|
*
|
|
* @Route("/{id}", name="previously-owned-flash_show", methods={"GET"})
|
|
*/
|
|
public function showAction(PreviouslyOwnedFlash $previouslyOwnedFlash)
|
|
{
|
|
return $this->itemView($previouslyOwnedFlash, 'previouslyownedcamera/show.html.twig', 'previouslyOwnedFlash');
|
|
}
|
|
|
|
/**
|
|
* Displays a form to edit an existing previouslyOwnedFlash entity.
|
|
*
|
|
* @Route("/{id}/edit", name="previously-owned-flash_edit", methods={"GET", "POST"})
|
|
*/
|
|
public function editAction(Request $request, PreviouslyOwnedFlash $previouslyOwnedFlash)
|
|
{
|
|
return $this->itemUpdate($request, $previouslyOwnedFlash, 'previouslyownedflash/edit.html.twig', 'previouslyOwnedFlash', 'previously-owned-flash_show');
|
|
}
|
|
}
|