mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-13 11:54:32 +02:00
Fixed some inspection issues
This commit is contained in:
parent
a5cbe59a7c
commit
ba5ae35809
20 changed files with 35 additions and 36 deletions
|
@ -38,7 +38,7 @@ class DateTimeConstraintType extends AbstractType
|
|||
$resolver->setDefaults([
|
||||
'compound' => true,
|
||||
'data_class' => DateTimeConstraint::class,
|
||||
'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units
|
||||
'text_suffix' => '', // A suffix which is attached as text-append to the input group. This can for example be used for units
|
||||
|
||||
'value1_options' => [], // Options for the first value input
|
||||
'value2_options' => [], // Options for the second value input
|
||||
|
|
|
@ -55,7 +55,7 @@ class RichTextEditorType extends AbstractType
|
|||
{
|
||||
$tmp = [];
|
||||
|
||||
//Set novalidate attribute or we will get problems that form can not be submitted as textarea is not focusable
|
||||
//Set novalidate attribute, or we will get problems that form can not be submitted as textarea is not focusable
|
||||
$tmp['novalidate'] = 'novalidate';
|
||||
|
||||
$tmp['data-mode'] = $options['mode'];
|
||||
|
|
|
@ -109,12 +109,7 @@ class StructuralEntityType extends AbstractType
|
|||
return null;
|
||||
}
|
||||
|
||||
if ($element->getID() === null) {
|
||||
//Must be the same as the separator in the choice_loader, otherwise this will not work!
|
||||
return $element->getFullPath('->');
|
||||
}
|
||||
|
||||
return $element->getID();
|
||||
return (string) $element->getID() ?? $element->getFullPath('->');
|
||||
}, //Use the element id as option value and for comparing items
|
||||
'choice_loader' => function (Options $options) {
|
||||
return new StructuralEntityChoiceLoader($options, $this->builder, $this->em);
|
||||
|
|
|
@ -70,7 +70,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
*
|
||||
* 1. Model transformers which normalize the model data.
|
||||
* This is mainly useful when the same form type (the same configuration)
|
||||
* has to handle different kind of underlying data, e.g The DateType can
|
||||
* has to handle different kind of underlying data, e.g. The DateType can
|
||||
* deal with strings or \DateTime objects as input.
|
||||
*
|
||||
* 2. View transformers which adapt the normalized data to the view format.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue