mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-27 05:19:31 +00:00
Applied code style rules to src/
This commit is contained in:
parent
700c049d26
commit
f861de791f
186 changed files with 1462 additions and 1059 deletions
|
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
|
@ -38,14 +41,14 @@ class MassCreationForm extends AbstractType
|
|||
$this->security = $security;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$data = $options['data'];
|
||||
|
||||
//Disable import if user is not allowed to create elements.
|
||||
$entity = new $data['entity_class']();
|
||||
$perm_name = 'create';
|
||||
$disabled = !$this->security->isGranted($perm_name, $entity);
|
||||
$disabled = ! $this->security->isGranted($perm_name, $entity);
|
||||
|
||||
$builder
|
||||
->add('lines', TextareaType::class, ['data' => '',
|
||||
|
|
@ -66,8 +69,8 @@ class MassCreationForm extends AbstractType
|
|||
|
||||
//Buttons
|
||||
$builder->add('create', SubmitType::class, [
|
||||
'label' => 'entity.mass_creation.btn',
|
||||
'disabled' => $disabled,
|
||||
]);
|
||||
'label' => 'entity.mass_creation.btn',
|
||||
'disabled' => $disabled,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue