@@ -66,12 +66,12 @@ |
||
66 | 66 | //Disable import if user is not allowed to create elements. |
67 | 67 | $entity = new $data['entity_class'](); |
68 | 68 | $perm_name = "create"; |
69 | - $disabled = ! $this->security->isGranted($perm_name, $entity); |
|
69 | + $disabled = !$this->security->isGranted($perm_name, $entity); |
|
70 | 70 | |
71 | 71 | $builder |
72 | 72 | |
73 | 73 | ->add('format', ChoiceType::class, [ |
74 | - 'choices' => ['JSON' => 'json', 'XML' => 'xml','CSV' => 'csv' ,'YAML' => 'yaml'], |
|
74 | + 'choices' => ['JSON' => 'json', 'XML' => 'xml', 'CSV' => 'csv', 'YAML' => 'yaml'], |
|
75 | 75 | 'label' => $this->trans->trans('export.format'), |
76 | 76 | 'disabled' => $disabled]) |
77 | 77 | ->add('csv_separator', TextType::class, ['data' => ';', |
@@ -65,7 +65,7 @@ |
||
65 | 65 | //Disable import if user is not allowed to create elements. |
66 | 66 | $entity = new $data['entity_class'](); |
67 | 67 | $perm_name = "create"; |
68 | - $disabled = ! $this->security->isGranted($perm_name, $entity); |
|
68 | + $disabled = !$this->security->isGranted($perm_name, $entity); |
|
69 | 69 | |
70 | 70 | $builder |
71 | 71 | ->add('lines', TextareaType::class, ['data' => '', |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | 'label' => $this->trans->trans('entity.edit.not_selectable'), |
84 | 84 | 'help' => $this->trans->trans('entity.edit.not_selectable.help'), |
85 | 85 | 'label_attr' => ['class' => 'checkbox-custom'], |
86 | - 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity) ]) |
|
86 | + 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]) |
|
87 | 87 | |
88 | 88 | ->add('comment', CKEditorType::class, ['required' => false, 'empty_data' => '', |
89 | 89 | 'label' => $this->trans->trans('comment.label'), |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | //Buttons |
96 | 96 | $builder->add('save', SubmitType::class, [ |
97 | - 'label' => $is_new ? $this->trans->trans('entity.create') : $this->trans->trans('entity.edit.save'), |
|
97 | + 'label' => $is_new ? $this->trans->trans('entity.create') : $this->trans->trans('entity.edit.save'), |
|
98 | 98 | 'attr' => ['class' => $is_new ? 'btn-success' : ''], |
99 | 99 | 'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]) |
100 | 100 | ->add('reset', ResetType::class, ['label' => 'entity.edit.reset', |
@@ -217,12 +217,12 @@ |
||
217 | 217 | 'label' => $this->trans->trans('part.edit.master_attachment'), |
218 | 218 | 'class' => PartAttachment::class, |
219 | 219 | 'attr' => ['class' => 'selectpicker'], |
220 | - 'choice_attr' => function ($choice, $key, $value) { |
|
220 | + 'choice_attr' => function($choice, $key, $value) { |
|
221 | 221 | /** @var Attachment $choice */ |
222 | 222 | return ['data-subtext' => $choice->getFilename() ?? "URL"]; |
223 | 223 | }, |
224 | 224 | 'choice_label' => 'name', |
225 | - 'query_builder' => function (EntityRepository $er) use ($part) { |
|
225 | + 'query_builder' => function(EntityRepository $er) use ($part) { |
|
226 | 226 | return $er->createQueryBuilder('u') |
227 | 227 | ->where('u.element = ?1') |
228 | 228 | ->andWhere("u.path <> ''") |