@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $dataTable |
162 | 162 | ->add('picture', TextColumn::class, [ |
163 | 163 | 'label' => '', |
164 | - 'render' => function ($value, Part $context) { |
|
164 | + 'render' => function($value, Part $context) { |
|
165 | 165 | $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context); |
166 | 166 | if (null === $preview_attachment) { |
167 | 167 | return ''; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | ]) |
179 | 179 | ->add('name', TextColumn::class, [ |
180 | 180 | 'label' => $this->translator->trans('part.table.name'), |
181 | - 'render' => function ($value, Part $context) { |
|
181 | + 'render' => function($value, Part $context) { |
|
182 | 182 | return sprintf( |
183 | 183 | '<a href="%s">%s</a>', |
184 | 184 | $this->urlGenerator->infoURL($context), |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | ]) |
208 | 208 | ->add('storelocation', TextColumn::class, [ |
209 | 209 | 'label' => $this->translator->trans('part.table.storeLocations'), |
210 | - 'render' => function ($value, Part $context) { |
|
210 | + 'render' => function($value, Part $context) { |
|
211 | 211 | $tmp = []; |
212 | 212 | foreach ($context->getPartLots() as $lot) { |
213 | 213 | //Ignore lots without storelocation |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | ]) |
227 | 227 | ->add('amount', TextColumn::class, [ |
228 | 228 | 'label' => $this->translator->trans('part.table.amount'), |
229 | - 'render' => function ($value, Part $context) { |
|
229 | + 'render' => function($value, Part $context) { |
|
230 | 230 | $amount = $context->getAmountSum(); |
231 | 231 | |
232 | 232 | return $this->amountFormatter->format($amount, $context->getPartUnit()); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | ->add('minamount', TextColumn::class, [ |
236 | 236 | 'label' => $this->translator->trans('part.table.minamount'), |
237 | 237 | 'visible' => false, |
238 | - 'render' => function ($value, Part $context) { |
|
238 | + 'render' => function($value, Part $context) { |
|
239 | 239 | return $this->amountFormatter->format($value, $context->getPartUnit()); |
240 | 240 | }, |
241 | 241 | ]) |
@@ -298,12 +298,12 @@ discard block |
||
298 | 298 | |
299 | 299 | ->addOrderBy('name') |
300 | 300 | ->createAdapter(CustomORMAdapter::class, [ |
301 | - 'query' => function (QueryBuilder $builder) { |
|
301 | + 'query' => function(QueryBuilder $builder) { |
|
302 | 302 | $this->getQuery($builder); |
303 | 303 | }, |
304 | 304 | 'entity' => Part::class, |
305 | 305 | 'criteria' => [ |
306 | - function (QueryBuilder $builder) use ($options) { |
|
306 | + function(QueryBuilder $builder) use ($options) { |
|
307 | 307 | $this->buildCriteria($builder, $options); |
308 | 308 | }, |
309 | 309 | new SearchCriteriaProvider(), |
@@ -95,7 +95,7 @@ |
||
95 | 95 | 'required' => false, |
96 | 96 | 'attr' => ['class' => 'selectpicker'], |
97 | 97 | 'choices' => User::AVAILABLE_THEMES, |
98 | - 'choice_label' => function ($entity, $key, $value) { |
|
98 | + 'choice_label' => function($entity, $key, $value) { |
|
99 | 99 | return $value; |
100 | 100 | }, |
101 | 101 | 'placeholder' => 'user_settings.theme.placeholder', |
@@ -77,7 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $key = 'tree_tools_'.$this->keyGenerator->generateKey(); |
79 | 79 | |
80 | - return $this->cache->get($key, function (ItemInterface $item) { |
|
80 | + return $this->cache->get($key, function(ItemInterface $item) { |
|
81 | 81 | //Invalidate tree, whenever group or the user changes |
82 | 82 | $item->tag(['tree_tools', 'groups', $this->keyGenerator->generateKey()]); |
83 | 83 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | throw new \RuntimeException('$context must be a Part object!'); |
61 | 61 | } |
62 | 62 | $tmp = ''; |
63 | - $attachments = $context->getAttachments()->filter(function (Attachment $attachment) { |
|
63 | + $attachments = $context->getAttachments()->filter(function(Attachment $attachment) { |
|
64 | 64 | return $attachment->getShowInTable() && $this->attachmentManager->isFileExisting($attachment); |
65 | 65 | }); |
66 | 66 |
@@ -136,7 +136,7 @@ |
||
136 | 136 | $secure_class_name = str_replace('\\', '_', $class); |
137 | 137 | $key = 'treeview_'.$this->keyGenerator->generateKey().'_'.$secure_class_name; |
138 | 138 | |
139 | - $ret = $this->cache->get($key, function (ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
139 | + $ret = $this->cache->get($key, function(ItemInterface $item) use ($repo, $parent, $secure_class_name) { |
|
140 | 140 | // Invalidate when groups, a element with the class or the user changes |
141 | 141 | $item->tag(['groups', 'tree_treeview', $this->keyGenerator->generateKey(), $secure_class_name]); |
142 | 142 |
@@ -166,7 +166,7 @@ |
||
166 | 166 | $secure_class_name = str_replace('\\', '_', $class_name); |
167 | 167 | $key = 'list_'.$this->keyGenerator->generateKey().'_'.$secure_class_name.$parent_id; |
168 | 168 | |
169 | - $ret = $this->cache->get($key, function (ItemInterface $item) use ($class_name, $parent, $secure_class_name) { |
|
169 | + $ret = $this->cache->get($key, function(ItemInterface $item) use ($class_name, $parent, $secure_class_name) { |
|
170 | 170 | // Invalidate when groups, a element with the class or the user changes |
171 | 171 | $item->tag(['groups', 'tree_list', $this->keyGenerator->generateKey(), $secure_class_name]); |
172 | 172 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | public function buildForm(FormBuilderInterface $builder, array $options) |
45 | 45 | { |
46 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
46 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
47 | 47 | $form = $event->getForm(); |
48 | 48 | /** @var User $user */ |
49 | 49 | $user = $event->getData(); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $dataTable->add('picture', TextColumn::class, [ |
70 | 70 | 'label' => '', |
71 | - 'render' => function ($value, Attachment $context) { |
|
71 | + 'render' => function($value, Attachment $context) { |
|
72 | 72 | if ($context->isPicture() |
73 | 73 | && !$context->isExternal() |
74 | 74 | && $this->attachmentHelper->isFileExisting($context)) { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | $dataTable->add('name', TextColumn::class, [ |
89 | 89 | 'label' => 'attachment.edit.name', |
90 | - 'render' => function ($value, Attachment $context) { |
|
90 | + 'render' => function($value, Attachment $context) { |
|
91 | 91 | //Link to external source |
92 | 92 | if ($context->isExternal()) { |
93 | 93 | return sprintf( |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $dataTable->add('attachment_type', TextColumn::class, [ |
113 | 113 | 'label' => 'attachment.table.type', |
114 | 114 | 'field' => 'attachment_type.name', |
115 | - 'render' => function ($value, Attachment $context) { |
|
115 | + 'render' => function($value, Attachment $context) { |
|
116 | 116 | return sprintf( |
117 | 117 | '<a href="%s">%s</a>', |
118 | 118 | $this->entityURLGenerator->editURL($context->getAttachmentType()), |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $dataTable->add('element', TextColumn::class, [ |
125 | 125 | 'label' => 'attachment.table.element', |
126 | 126 | //'propertyPath' => 'element.name', |
127 | - 'render' => function ($value, Attachment $context) { |
|
127 | + 'render' => function($value, Attachment $context) { |
|
128 | 128 | return sprintf( |
129 | 129 | '<a href="%s">%s</a>', |
130 | 130 | $this->entityURLGenerator->infoURL($context->getElement()), |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | |
141 | 141 | $dataTable->add('filesize', TextColumn::class, [ |
142 | 142 | 'label' => $this->translator->trans('attachment.table.filesize'), |
143 | - 'render' => function ($value, Attachment $context) { |
|
143 | + 'render' => function($value, Attachment $context) { |
|
144 | 144 | if ($this->attachmentHelper->isFileExisting($context)) { |
145 | 145 | return $this->attachmentHelper->getHumanFileSize($context); |
146 | 146 | } |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | |
205 | 205 | $dataTable->createAdapter(ORMAdapter::class, [ |
206 | 206 | 'entity' => Attachment::class, |
207 | - 'query' => function (QueryBuilder $builder) { |
|
207 | + 'query' => function(QueryBuilder $builder) { |
|
208 | 208 | $this->getQuery($builder); |
209 | 209 | }, |
210 | 210 | ]); |