@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @var string |
28 | 28 | */ |
29 | - protected $language="de"; |
|
29 | + protected $language = "de"; |
|
30 | 30 | |
31 | 31 | public function __invoke(ElementInterface $element = null) |
32 | 32 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | /* |
61 | 61 | * |
62 | 62 | */ |
63 | - $markup = '<div class="input-group date">%s<div data-toggle="description" data-target="%s" class="input-group-addon" onClick="$(this).parent().find(\':input\').datepicker(\'show\')">' . |
|
63 | + $markup = '<div class="input-group date">%s<div data-toggle="description" data-target="%s" class="input-group-addon" onClick="$(this).parent().find(\':input\').datepicker(\'show\')">'. |
|
64 | 64 | '<i class="fa fa-calendar"></i></div></div><div class="checkbox"></div>'; |
65 | 65 | |
66 | 66 | $markup = sprintf( |
@@ -84,8 +84,8 @@ |
||
84 | 84 | if ($element instanceof ViewPartialProviderInterface) { |
85 | 85 | $parameterPartial = array_merge(array('element' => $element, 'layout' => $layout), $parameterPartial); |
86 | 86 | $content .= $this->getView()->partial( |
87 | - $element->getViewPartial(), |
|
88 | - $parameterPartial |
|
87 | + $element->getViewPartial(), |
|
88 | + $parameterPartial |
|
89 | 89 | ); |
90 | 90 | } elseif ($element instanceof ViewHelperProviderInterface) { |
91 | 91 | $helper = $element->getViewHelper(); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | |
66 | 66 | if (isset($parameter['render_label']) && $parameter['render_label'] && ($label = $container->getLabel())) { |
67 | - $content .= '<div class="container-headline"><h3>' . $this->getView()->translate($label) . '</h3></div>'; |
|
67 | + $content .= '<div class="container-headline"><h3>'.$this->getView()->translate($label).'</h3></div>'; |
|
68 | 68 | } |
69 | 69 | foreach ($container as $element) { |
70 | 70 | $content .= $this->renderElement($element, $layout, $parameter); |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | } elseif ($element instanceof CoreSummaryForm) { |
100 | 100 | $content .= $this->getView()->summaryForm($element); |
101 | 101 | } elseif ($element instanceof Container) { |
102 | - $content.= $this->render($element, $layout, $parameter); |
|
102 | + $content .= $this->render($element, $layout, $parameter); |
|
103 | 103 | } else { |
104 | - $content.= $this->getView()->form($element, $layout, $parameter); |
|
104 | + $content .= $this->getView()->form($element, $layout, $parameter); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | return $content; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | if (null === $buttonContent) { |
27 | 27 | throw new Exception\DomainException( |
28 | 28 | sprintf( |
29 | - '%s expects either button content as the second argument, ' . |
|
29 | + '%s expects either button content as the second argument, '. |
|
30 | 30 | 'or that the element provided has a label value; neither found', |
31 | 31 | __METHOD__ |
32 | 32 | ) |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $checkedBoole = ($value == 1 || $value == 'on'); |
47 | 47 | |
48 | 48 | |
49 | - $checkedClass = $checkedBoole?'active"':''; |
|
49 | + $checkedClass = $checkedBoole ? 'active"' : ''; |
|
50 | 50 | |
51 | 51 | $hiddenElement = ''; |
52 | 52 | if ($element->useHiddenElement()) { |
@@ -63,11 +63,11 @@ discard block |
||
63 | 63 | $element->setUseHiddenElement(false); |
64 | 64 | } |
65 | 65 | |
66 | - $buttonContent = $hiddenElement . PHP_EOL |
|
67 | - . '<div class="btn-group" data-toggle="buttons">' . PHP_EOL |
|
68 | - . '<label class="btn btn-default ' . $checkedClass . '">' . PHP_EOL |
|
69 | - . parent::render($element) . $buttonContent . PHP_EOL . '</label>' . PHP_EOL |
|
70 | - . '</div>' . PHP_EOL; |
|
66 | + $buttonContent = $hiddenElement.PHP_EOL |
|
67 | + . '<div class="btn-group" data-toggle="buttons">'.PHP_EOL |
|
68 | + . '<label class="btn btn-default '.$checkedClass.'">'.PHP_EOL |
|
69 | + . parent::render($element).$buttonContent.PHP_EOL.'</label>'.PHP_EOL |
|
70 | + . '</div>'.PHP_EOL; |
|
71 | 71 | |
72 | 72 | return $buttonContent; |
73 | 73 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | if ($headline) { |
37 | - $headline = '<h6>' . $translator->translate($headline, $textDomain) . '</h6>'; |
|
37 | + $headline = '<h6>'.$translator->translate($headline, $textDomain).'</h6>'; |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | $markup = '<div class="checkbox"><label for="%s">%s %s</label></div>'; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $label |
47 | 47 | ); |
48 | 48 | |
49 | - return $headline . $markup; |
|
49 | + return $headline.$markup; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -1,6 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - |
|
4 | 3 | */ |
5 | 4 | |
6 | 5 | namespace Core\Form\View\Helper; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $renderer->headscript()->appendFile($renderer->basepath('modules/Core/js/jquery.summary-form.js')); |
68 | 68 | |
69 | 69 | $label = $form->getLabel(); |
70 | - $labelContent = $label ? '<div class="sf-headline"><h3>' . $this->getView()->translate($label) . '</h3></div>' : ''; |
|
70 | + $labelContent = $label ? '<div class="sf-headline"><h3>'.$this->getView()->translate($label).'</h3></div>' : ''; |
|
71 | 71 | $formContent = $this->renderForm($form, $layout, $parameter); |
72 | 72 | $summaryContent = $this->renderSummary($form); |
73 | 73 | |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | public function renderForm(SummaryFormInterface $form, $layout = Form::LAYOUT_HORIZONTAL, $parameter = array()) |
133 | 133 | { |
134 | 134 | /* @var $form SummaryFormInterface|\Core\Form\SummaryForm */ |
135 | - $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
136 | - $formHelper = $renderer->plugin('form'); /* @var $formHelper \Core\Form\View\Helper\Form */ |
|
135 | + $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
136 | + $formHelper = $renderer->plugin('form'); /* @var $formHelper \Core\Form\View\Helper\Form */ |
|
137 | 137 | $fieldset = $form->getBaseFieldset(); |
138 | 138 | $resetPartial = false; |
139 | 139 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | $form->prepare(); |
168 | 168 | $baseFieldset = $form->getBaseFieldset(); |
169 | 169 | if (!isset($baseFieldset)) { |
170 | - throw new \InvalidArgumentException('For the Form ' . get_class($form) . ' there is no Basefieldset'); |
|
170 | + throw new \InvalidArgumentException('For the Form '.get_class($form).' there is no Basefieldset'); |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | $dataAttributesMarkup = ''; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
181 | - $markup = '<div class="panel panel-default" style="min-height: 100px;"' . $dataAttributesMarkup . '> |
|
181 | + $markup = '<div class="panel panel-default" style="min-height: 100px;"'.$dataAttributesMarkup.'> |
|
182 | 182 | <div class="panel-body"><div class="sf-controls">%s</div>%s</div></div>'; |
183 | 183 | |
184 | 184 | $view = $this->getView(); |
@@ -190,9 +190,9 @@ discard block |
||
190 | 190 | . '</button>'; |
191 | 191 | |
192 | 192 | if (($controlButtons = $form->getOption('control_buttons')) !== null) { |
193 | - $buttonMarkup .= PHP_EOL . implode(PHP_EOL, array_map(function (array $buttonSpec) use ($view) { |
|
194 | - return '<button type="button" class="btn btn-default btn-xs' . (isset($buttonSpec['class']) ? ' ' . $buttonSpec['class'] : '') . '">' |
|
195 | - . (isset($buttonSpec['icon']) ? '<span class="yk-icon yk-icon-' . $buttonSpec['icon'] . '"></span> ' : '') |
|
193 | + $buttonMarkup .= PHP_EOL.implode(PHP_EOL, array_map(function(array $buttonSpec) use ($view) { |
|
194 | + return '<button type="button" class="btn btn-default btn-xs'.(isset($buttonSpec['class']) ? ' '.$buttonSpec['class'] : '').'">' |
|
195 | + . (isset($buttonSpec['icon']) ? '<span class="yk-icon yk-icon-'.$buttonSpec['icon'].'"></span> ' : '') |
|
196 | 196 | . $view->translate($buttonSpec['label']) |
197 | 197 | . '</button>'; |
198 | 198 | }, $controlButtons)); |
@@ -232,10 +232,10 @@ discard block |
||
232 | 232 | } |
233 | 233 | |
234 | 234 | if ($element instanceof ViewPartialProviderInterface) { |
235 | - $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
235 | + $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
236 | 236 | $origPartial = $element->getViewPartial(); |
237 | 237 | $partial = "$origPartial.view"; |
238 | - $partialParams = array( |
|
238 | + $partialParams = array( |
|
239 | 239 | 'element' => $element |
240 | 240 | ); |
241 | 241 | if (!$renderer->resolver($partial)) { |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | |
252 | 252 | if ($element instanceof FieldsetInterface) { |
253 | 253 | if (!$element instanceof FormInterface && $label) { |
254 | - $markup .= '<h4>' . $label . '</h4>'; |
|
254 | + $markup .= '<h4>'.$label.'</h4>'; |
|
255 | 255 | } |
256 | 256 | foreach ($element as $el) { |
257 | 257 | $markup .= $this->renderSummaryElement($el); |
@@ -283,11 +283,11 @@ discard block |
||
283 | 283 | } |
284 | 284 | |
285 | 285 | $optGroupLabel = isset($optVal['label']) ? $translator->translate($optVal['label']) : $optKey; |
286 | - $multiOptions[] = $optGroupLabel . ' | ' . $translator->translate($optVal['options'][$optionKey]); |
|
286 | + $multiOptions[] = $optGroupLabel.' | '.$translator->translate($optVal['options'][$optionKey]); |
|
287 | 287 | } |
288 | 288 | } |
289 | 289 | |
290 | - $elementValue = '<ul><li>' . join('</li><li>', $multiOptions) . '</li></ul>'; |
|
290 | + $elementValue = '<ul><li>'.join('</li><li>', $multiOptions).'</li></ul>'; |
|
291 | 291 | } else { |
292 | 292 | $elementValue = $translator->translate($options[$elementValue]); |
293 | 293 | } |
@@ -301,10 +301,10 @@ discard block |
||
301 | 301 | $markup .= '<div class="row">'; |
302 | 302 | $col = 12; |
303 | 303 | if ($label) { |
304 | - $markup .= '<div class="col-md-3 yk-label"><label>' . $label . '</label></div>'; |
|
304 | + $markup .= '<div class="col-md-3 yk-label"><label>'.$label.'</label></div>'; |
|
305 | 305 | $col = 9; |
306 | 306 | } |
307 | - $markup .= '<div class="col-md-' . $col . '">' . $elementValue . '</div>' |
|
307 | + $markup .= '<div class="col-md-'.$col.'">'.$elementValue.'</div>' |
|
308 | 308 | . '</div>'; |
309 | 309 | return $markup; |
310 | 310 | } |
@@ -89,25 +89,25 @@ |
||
89 | 89 | $tabId = $containerId . '-' . strtolower($tabElement->getName()); |
90 | 90 | $tabsNav .= '<li><a data-toggle="tab" href="#' . $tabId . '">' . $translate($tabElement->getLabel()) . '</a></li>'; |
91 | 91 | $tabsContent .= '<div class="tab-pane" id="' . $tabId . '">' |
92 | - . $formContainer($tabElement, $layout, $parameter) |
|
93 | - . '</div>'; |
|
92 | + . $formContainer($tabElement, $layout, $parameter) |
|
93 | + . '</div>'; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | $content .= '<style type="text/css">.tab-content > div > div:first-child { margin-top: 10px; }</style><div class="wizard-container" id="' . $containerId . '">' |
97 | - . '<ul>' . $tabsNav . '</ul>' |
|
98 | - . '<div class="tab-content">' . $tabsContent . '</div>'; |
|
97 | + . '<ul>' . $tabsNav . '</ul>' |
|
98 | + . '<div class="tab-content">' . $tabsContent . '</div>'; |
|
99 | 99 | if ($containerParams['pager']) { |
100 | 100 | $content .='<ul class="pager wizard">' |
101 | - . '<li class="previous"><a href="javascript:;">← ' . $translate('previous') . '</a></li>' |
|
102 | - . '<li class="next"><a href="javascript:;">' . $translate('Next') . ' →</a></li>' |
|
103 | - . '<li class="finish' . ($containerParams['finish_enabled'] ? '' : ' disabled') . '">' |
|
104 | - . ( |
|
105 | - false !== $containerParams['finish_label'] |
|
101 | + . '<li class="previous"><a href="javascript:;">← ' . $translate('previous') . '</a></li>' |
|
102 | + . '<li class="next"><a href="javascript:;">' . $translate('Next') . ' →</a></li>' |
|
103 | + . '<li class="finish' . ($containerParams['finish_enabled'] ? '' : ' disabled') . '">' |
|
104 | + . ( |
|
105 | + false !== $containerParams['finish_label'] |
|
106 | 106 | ? '<a class="pull-right" href="' . $containerParams['finish_href'] . '">' |
107 | - . $translate($containerParams['finish_label']) . ' •</a>' |
|
107 | + . $translate($containerParams['finish_label']) . ' •</a>' |
|
108 | 108 | : '' |
109 | 109 | ) |
110 | - . '</li></ul>'; |
|
110 | + . '</li></ul>'; |
|
111 | 111 | } |
112 | 112 | $content .= '</div>'; |
113 | 113 |
@@ -82,29 +82,29 @@ |
||
82 | 82 | |
83 | 83 | $containerId = $container->getAttribute('id'); |
84 | 84 | if (!$containerId) { |
85 | - $containerId = 'wizardcontainer-' . strtolower(str_replace('\\', '-', get_class($container))); |
|
85 | + $containerId = 'wizardcontainer-'.strtolower(str_replace('\\', '-', get_class($container))); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | foreach ($container as $tabElement) { |
89 | - $tabId = $containerId . '-' . strtolower($tabElement->getName()); |
|
90 | - $tabsNav .= '<li><a data-toggle="tab" href="#' . $tabId . '">' . $translate($tabElement->getLabel()) . '</a></li>'; |
|
91 | - $tabsContent .= '<div class="tab-pane" id="' . $tabId . '">' |
|
89 | + $tabId = $containerId.'-'.strtolower($tabElement->getName()); |
|
90 | + $tabsNav .= '<li><a data-toggle="tab" href="#'.$tabId.'">'.$translate($tabElement->getLabel()).'</a></li>'; |
|
91 | + $tabsContent .= '<div class="tab-pane" id="'.$tabId.'">' |
|
92 | 92 | . $formContainer($tabElement, $layout, $parameter) |
93 | 93 | . '</div>'; |
94 | 94 | } |
95 | 95 | |
96 | - $content .= '<style type="text/css">.tab-content > div > div:first-child { margin-top: 10px; }</style><div class="wizard-container" id="' . $containerId . '">' |
|
97 | - . '<ul>' . $tabsNav . '</ul>' |
|
98 | - . '<div class="tab-content">' . $tabsContent . '</div>'; |
|
96 | + $content .= '<style type="text/css">.tab-content > div > div:first-child { margin-top: 10px; }</style><div class="wizard-container" id="'.$containerId.'">' |
|
97 | + . '<ul>'.$tabsNav.'</ul>' |
|
98 | + . '<div class="tab-content">'.$tabsContent.'</div>'; |
|
99 | 99 | if ($containerParams['pager']) { |
100 | - $content .='<ul class="pager wizard">' |
|
101 | - . '<li class="previous"><a href="javascript:;">← ' . $translate('previous') . '</a></li>' |
|
102 | - . '<li class="next"><a href="javascript:;">' . $translate('Next') . ' →</a></li>' |
|
103 | - . '<li class="finish' . ($containerParams['finish_enabled'] ? '' : ' disabled') . '">' |
|
100 | + $content .= '<ul class="pager wizard">' |
|
101 | + . '<li class="previous"><a href="javascript:;">← '.$translate('previous').'</a></li>' |
|
102 | + . '<li class="next"><a href="javascript:;">'.$translate('Next').' →</a></li>' |
|
103 | + . '<li class="finish'.($containerParams['finish_enabled'] ? '' : ' disabled').'">' |
|
104 | 104 | . ( |
105 | 105 | false !== $containerParams['finish_label'] |
106 | - ? '<a class="pull-right" href="' . $containerParams['finish_href'] . '">' |
|
107 | - . $translate($containerParams['finish_label']) . ' •</a>' |
|
106 | + ? '<a class="pull-right" href="'.$containerParams['finish_href'].'">' |
|
107 | + . $translate($containerParams['finish_label']).' •</a>' |
|
108 | 108 | : '' |
109 | 109 | ) |
110 | 110 | . '</li></ul>'; |
@@ -25,8 +25,8 @@ |
||
25 | 25 | */ |
26 | 26 | class Form extends ZendForm implements |
27 | 27 | DescriptionAwareFormInterface, |
28 | - DisableElementsCapableInterface, |
|
29 | - FormParentInterface |
|
28 | + DisableElementsCapableInterface, |
|
29 | + FormParentInterface |
|
30 | 30 | { |
31 | 31 | use EventManagerAwareTrait, HydratorStrategyAwareTrait; |
32 | 32 |
@@ -368,9 +368,9 @@ |
||
368 | 368 | if (!$inputExists && $required) { |
369 | 369 | $fieldsetName = ''; |
370 | 370 | if ($fieldset->hasAttribute('name')) { |
371 | - $fieldsetName = 'in Fieldset "' . $fieldset->getAttribute('name') . '" '; |
|
371 | + $fieldsetName = 'in Fieldset "'.$fieldset->getAttribute('name').'" '; |
|
372 | 372 | } |
373 | - throw new \RuntimeException('input for "' . $name . '" ' . $fieldsetName . 'is required but a input-field with this name is not defined'); |
|
373 | + throw new \RuntimeException('input for "'.$name.'" '.$fieldsetName.'is required but a input-field with this name is not defined'); |
|
374 | 374 | } |
375 | 375 | } |
376 | 376 | } |
@@ -49,11 +49,11 @@ |
||
49 | 49 | $properties = $refl->getProperties(); |
50 | 50 | |
51 | 51 | foreach ($properties as $property) { |
52 | - $name = $property->getName(); |
|
52 | + $name = $property->getName(); |
|
53 | 53 | if ('_' == $name{0}) { |
54 | 54 | continue; |
55 | 55 | } |
56 | - $value = $rating->{'get' . $name}(); |
|
56 | + $value = $rating->{'get'.$name}(); |
|
57 | 57 | $input = array( |
58 | 58 | 'type' => 'Core/Rating', |
59 | 59 | 'name' => $name, |