mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Removed remaining annotations
This commit is contained in:
parent
930adaf439
commit
3d7cf8f7f3
4 changed files with 5 additions and 13 deletions
|
@ -48,6 +48,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||
use Exception;
|
||||
use Omines\DataTablesBundle\DataTableFactory;
|
||||
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
|
@ -198,16 +199,13 @@ class PartController extends AbstractController
|
|||
return $this->redirectToRoute('homepage');
|
||||
}
|
||||
|
||||
/**
|
||||
* @ParamConverter("part", options={"id" = "id"})
|
||||
* @ParamConverter("project", options={"id" = "project_id"})
|
||||
*/
|
||||
#[Route(path: '/new', name: 'part_new')]
|
||||
#[Route(path: '/{id}/clone', name: 'part_clone')]
|
||||
#[Route(path: '/new_build_part/{project_id}', name: 'part_new_build_part')]
|
||||
public function new(Request $request, EntityManagerInterface $em, TranslatorInterface $translator,
|
||||
AttachmentSubmitHandler $attachmentSubmitHandler, ProjectBuildPartHelper $projectBuildPartHelper,
|
||||
?Part $part = null, ?Project $project = null): Response
|
||||
#[MapEntity(mapping: ['id' => 'id'])] ?Part $part = null,
|
||||
#[MapEntity(mapping: ['id' => 'project_id'])] ?Project $project = null): Response
|
||||
{
|
||||
|
||||
if ($part instanceof Part) {
|
||||
|
|
|
@ -38,10 +38,7 @@ abstract class AttachmentContainingDBElement extends AbstractNamedDBElement impl
|
|||
|
||||
/**
|
||||
* @var Attachment[]|Collection
|
||||
* //TODO
|
||||
* //@ORM\OneToMany(targetEntity="Attachment", mappedBy="element")
|
||||
*
|
||||
* Mapping is done in sub classes like part
|
||||
* ORM Mapping is done in subclasses (e.g. Part)
|
||||
*/
|
||||
#[Groups(['full'])]
|
||||
protected Collection $attachments;
|
||||
|
|
|
@ -80,7 +80,7 @@ class ProjectBuildHelper
|
|||
/**
|
||||
* Checks if the given project can be built with the current stock.
|
||||
* This means that the maximum buildable count is greater or equal than the requested $number_of_projects
|
||||
* @parm int $number_of_builds
|
||||
* @param int $number_of_builds
|
||||
*/
|
||||
public function isProjectBuildable(Project $project, int $number_of_builds = 1): bool
|
||||
{
|
||||
|
|
|
@ -24,9 +24,6 @@ namespace App\Validator\Constraints;
|
|||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
/**
|
||||
* @Annotation
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
||||
class ValidFileFilter extends Constraint
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue