@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | public function form_end(FormView $view, array $data) |
| 76 | 76 | { |
| 77 | 77 | $string = ''; |
| 78 | - if ( !isset($data['render_rest']) |
|
| 78 | + if (!isset($data['render_rest']) |
|
| 79 | 79 | || $data['render_rest']) { |
| 80 | 80 | $string .= $this->renderer->rest($view); |
| 81 | 81 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | $string .= '<div class="attachment-container">'; |
| 167 | 167 | $string .= '<div class="attachment-preview">'; |
| 168 | 168 | if (!empty($data['value']['filename'])) { |
| 169 | - $ext = pathinfo($data['value']['filename'], PATHINFO_EXTENSION);; |
|
| 169 | + $ext = pathinfo($data['value']['filename'], PATHINFO_EXTENSION); ; |
|
| 170 | 170 | $string .= '<a href="' . $data['value']['url'] . '" target="_blank" class="icon" title="' . $data['value']['filename'] . '">'; |
| 171 | 171 | $string .= '<i class="fa fa-file-o"></i><span class="extension">' . $ext . '</span></a>'; |
| 172 | 172 | } else { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $data['attr']['class'] = 'shorttext'; |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | - if ( !empty($data['value']) |
|
| 214 | + if (!empty($data['value']) |
|
| 215 | 215 | || is_numeric($data['value'])) { |
| 216 | 216 | $data['attr']['value'] = $data['value']; |
| 217 | 217 | } |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | $jsinit .= "midcom_helper_datamanager2_autocomplete.create_dm2_widget('{$element_id}_search_input', {$data['min_chars']});\n"; |
| 257 | 257 | |
| 258 | 258 | $string = '<fieldset ' . $this->renderer->block($view, 'widget_container_attributes') . '>'; |
| 259 | - $string .= $this->renderer->widget($view['selection']); |
|
| 259 | + $string .= $this->renderer->widget($view['selection']); |
|
| 260 | 260 | $string .= ' ' . $this->renderer->widget($view['search_input']); |
| 261 | 261 | $string .= '</fieldset>'; |
| 262 | 262 | return $string . $this->jsinit($jsinit); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | return $string . $this->renderer->block($view, 'form_widget_simple', ['type' => "hidden"]); |
| 305 | 305 | } |
| 306 | 306 | $string = '<select '; |
| 307 | - if ( $data['required'] |
|
| 307 | + if ($data['required'] |
|
| 308 | 308 | && null === $data['placeholder'] |
| 309 | 309 | && $data['placeholder_in_choices'] === false |
| 310 | 310 | && $data['multiple'] === false) { |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $string .= $this->renderer->block($view, 'widget_attributes', $data) . '>'; |
| 319 | 319 | if (null !== $data['placeholder']) { |
| 320 | 320 | $string .= '<option value=""'; |
| 321 | - if ( $data['required'] |
|
| 321 | + if ($data['required'] |
|
| 322 | 322 | && empty($data['value']) |
| 323 | 323 | && "0" !== $data['value']) { |
| 324 | 324 | $string .= ' selected="selected"'; |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | $string .= '<label class="midcom_datamanager_photo_label">' . $this->renderer->humanize('delete photo') . ' ' . $this->renderer->widget($data['form']['delete']) . '</label>'; |
| 466 | 466 | $string .= '<ul>'; |
| 467 | 467 | foreach ($objects as $identifier => $info) { |
| 468 | - if ( $info['size_x'] |
|
| 468 | + if ($info['size_x'] |
|
| 469 | 469 | && $info['size_y']) { |
| 470 | 470 | $size = "{$info['size_x']}×{$info['size_y']}"; |
| 471 | 471 | } else { |
@@ -490,7 +490,7 @@ discard block |
||
| 490 | 490 | $string .= '</td></tr></table></div>'; |
| 491 | 491 | $string .= $this->renderer->row($data['form']['identifier']); |
| 492 | 492 | |
| 493 | - return $string . $this->jsinit('init_image_widget("' . $view->vars['id'] .'");'); |
|
| 493 | + return $string . $this->jsinit('init_image_widget("' . $view->vars['id'] . '");'); |
|
| 494 | 494 | } |
| 495 | 495 | |
| 496 | 496 | public function subform_widget(FormView $view, array $data) |