@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | ->add('description', CKEditorType::class, ['required' => false, 'empty_data' => '', |
82 | 82 | 'label' => 'description.label', 'help' => 'bbcode.hint', 'config_name' => 'description_config', |
83 | 83 | 'attr' => ['placeholder' => 'part.description.placeholder', 'rows' => 2], |
84 | - 'disabled' => !$this->security->isGranted('description.edit', $part) ]) |
|
84 | + 'disabled' => !$this->security->isGranted('description.edit', $part)]) |
|
85 | 85 | ->add('minAmount', SIUnitType::class, |
86 | 86 | ['attr' => ['min' => 0, 'placeholder' => 'part.mininstock.placeholder'], 'label' => 'mininstock.label', |
87 | 87 | 'show_prefix' => $use_si_prefix, "unit" => $part_unit_name, "is_integer" => !$part->useFloatAmount(), |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | 'disabled' => !$this->security->isGranted('move', $part), ]) |
95 | 95 | ->add('tags', TextType::class, ['required' => false, 'label' => 'part.tags', 'empty_data' => "", |
96 | 96 | 'attr' => ['data-role' => 'tagsinput'], |
97 | - 'disabled' => !$this->security->isGranted('edit', $part) ]); |
|
97 | + 'disabled' => !$this->security->isGranted('edit', $part)]); |
|
98 | 98 | |
99 | 99 | //Manufacturer section |
100 | 100 | $builder->add('manufacturer', StructuralEntityType::class, ['class' => Manufacturer::class, |
@@ -69,7 +69,7 @@ |
||
69 | 69 | |
70 | 70 | if ($options['show_prefix']) { |
71 | 71 | $builder->add('prefix', ChoiceType::class, [ |
72 | - 'choices' => ['M' => 6, 'k' => 3, '' => 0, 'm' => -3 ] |
|
72 | + 'choices' => ['M' => 6, 'k' => 3, '' => 0, 'm' => -3] |
|
73 | 73 | ]); |
74 | 74 | } |
75 | 75 |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | public function buildForm(FormBuilderInterface $builder, array $options) |
75 | 75 | { |
76 | 76 | $builder->addModelTransformer(new CallbackTransformer( |
77 | - function ($value) use ($options){ |
|
77 | + function($value) use ($options){ |
|
78 | 78 | return $this->transform($value, $options); |
79 | - }, function ($value) use ($options) { |
|
79 | + }, function($value) use ($options) { |
|
80 | 80 | return $this->reverseTransform($value, $options); |
81 | 81 | })); |
82 | 82 | } |
@@ -86,16 +86,16 @@ discard block |
||
86 | 86 | $resolver->setRequired(['class']); |
87 | 87 | $resolver->setDefaults(['attr' => ['class' => 'selectpicker', 'data-live-search' => true], |
88 | 88 | 'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext |
89 | - 'subentities_of' => null, //Only show entities with the given parent class |
|
90 | - 'disable_not_selectable' => false, //Disable entries with not selectable property |
|
89 | + 'subentities_of' => null, //Only show entities with the given parent class |
|
90 | + 'disable_not_selectable' => false, //Disable entries with not selectable property |
|
91 | 91 | 'choice_value' => 'id', //Use the element id as option value and for comparing items |
92 | - 'choice_loader' => function (Options $options) { |
|
93 | - return new CallbackChoiceLoader(function () use ($options) { |
|
92 | + 'choice_loader' => function(Options $options) { |
|
93 | + return new CallbackChoiceLoader(function() use ($options) { |
|
94 | 94 | return $this->getEntries($options); |
95 | 95 | }); |
96 | - }, 'choice_label' => function ($choice, $key, $value) { |
|
96 | + }, 'choice_label' => function($choice, $key, $value) { |
|
97 | 97 | return $this->generateChoiceLabels($choice, $key, $value); |
98 | - }, 'choice_attr' => function ($choice, $key, $value) { |
|
98 | + }, 'choice_attr' => function($choice, $key, $value) { |
|
99 | 99 | return $this->generateChoiceAttr($choice, $key, $value); |
100 | 100 | } |
101 | 101 | ]); |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | |
132 | 132 | $tmp = str_repeat(' ', $choice->getLevel()); //Use 3 spaces for intendation |
133 | - $tmp .= htmlspecialchars($choice->getName($parent)); |
|
133 | + $tmp .= htmlspecialchars($choice->getName($parent)); |
|
134 | 134 | return $tmp; |
135 | 135 | } |
136 | 136 |