mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-27 20:28:54 +02:00
Applied rector rules up to symfony 6.2
This commit is contained in:
parent
88ea920dfb
commit
a43af180a7
145 changed files with 563 additions and 889 deletions
|
@ -37,10 +37,9 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
/**
|
||||
* @Route("/select_api")
|
||||
*
|
||||
* This endpoint is used by the select2 library to dynamically load data (used in the multiselect action helper in parts lists)
|
||||
*/
|
||||
#[Route(path: '/select_api')]
|
||||
class SelectAPIController extends AbstractController
|
||||
{
|
||||
private NodesListBuilder $nodesListBuilder;
|
||||
|
@ -54,49 +53,37 @@ class SelectAPIController extends AbstractController
|
|||
$this->choiceHelper = $choiceHelper;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/category", name="select_category")
|
||||
*/
|
||||
#[Route(path: '/category', name: 'select_category')]
|
||||
public function category(): Response
|
||||
{
|
||||
return $this->getResponseForClass(Category::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/footprint", name="select_footprint")
|
||||
*/
|
||||
#[Route(path: '/footprint', name: 'select_footprint')]
|
||||
public function footprint(): Response
|
||||
{
|
||||
return $this->getResponseForClass(Footprint::class, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/manufacturer", name="select_manufacturer")
|
||||
*/
|
||||
#[Route(path: '/manufacturer', name: 'select_manufacturer')]
|
||||
public function manufacturer(): Response
|
||||
{
|
||||
return $this->getResponseForClass(Manufacturer::class, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/measurement_unit", name="select_measurement_unit")
|
||||
*/
|
||||
#[Route(path: '/measurement_unit', name: 'select_measurement_unit')]
|
||||
public function measurement_unit(): Response
|
||||
{
|
||||
return $this->getResponseForClass(MeasurementUnit::class, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/project", name="select_project")
|
||||
*/
|
||||
#[Route(path: '/project', name: 'select_project')]
|
||||
public function projects(): Response
|
||||
{
|
||||
return $this->getResponseForClass(Project::class, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/export_level", name="select_export_level")
|
||||
*/
|
||||
#[Route(path: '/export_level', name: 'select_export_level')]
|
||||
public function exportLevel(): Response
|
||||
{
|
||||
$entries = [
|
||||
|
@ -114,9 +101,9 @@ class SelectAPIController extends AbstractController
|
|||
}
|
||||
|
||||
/**
|
||||
* @Route("/label_profiles", name="select_label_profiles")
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/label_profiles', name: 'select_label_profiles')]
|
||||
public function labelProfiles(EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('@labels.create_labels');
|
||||
|
@ -135,9 +122,9 @@ class SelectAPIController extends AbstractController
|
|||
}
|
||||
|
||||
/**
|
||||
* @Route("/label_profiles_lot", name="select_label_profiles_lot")
|
||||
* @return Response
|
||||
*/
|
||||
#[Route(path: '/label_profiles_lot', name: 'select_label_profiles_lot')]
|
||||
public function labelProfilesLot(EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('@labels.create_labels');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue