@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | |
45 | 45 | // Does this element have errors ? |
46 | 46 | if (count($element->getMessages()) > 0 && !empty($inputErrorClass)) { |
47 | - $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : ''); |
|
48 | - $classAttributes = $classAttributes . $inputErrorClass; |
|
47 | + $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class').' ' : ''); |
|
48 | + $classAttributes = $classAttributes.$inputErrorClass; |
|
49 | 49 | |
50 | 50 | $element->setAttribute('class', $classAttributes); |
51 | 51 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | if ($label !== '' && !$element->hasAttribute('id')) { |
99 | - $label = '<span>' . $label . '</span>'; |
|
99 | + $label = '<span>'.$label.'</span>'; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // Button element is a special case, because label is always rendered inside it |
@@ -106,11 +106,11 @@ discard block |
||
106 | 106 | |
107 | 107 | switch ($this->labelPosition) { |
108 | 108 | case self::LABEL_PREPEND: |
109 | - $markup = $labelOpen . $label . $elementString . $labelClose; |
|
109 | + $markup = $labelOpen.$label.$elementString.$labelClose; |
|
110 | 110 | break; |
111 | 111 | case self::LABEL_APPEND: |
112 | 112 | default: |
113 | - $markup = $labelOpen . $elementString . $label . $labelClose; |
|
113 | + $markup = $labelOpen.$elementString.$label.$labelClose; |
|
114 | 114 | break; |
115 | 115 | } |
116 | 116 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | } else { |
122 | 122 | if (!empty($this->renderErrors)) { |
123 | - $markup = $elementString . $elementErrors; |
|
123 | + $markup = $elementString.$elementErrors; |
|
124 | 124 | } else { |
125 | 125 | $markup = $elementString; |
126 | 126 | } |
@@ -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; |
@@ -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>'; |
@@ -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 | } |
@@ -25,8 +25,8 @@ |
||
25 | 25 | */ |
26 | 26 | class Form extends LaminasForm implements |
27 | 27 | DescriptionAwareFormInterface, |
28 | - DisableElementsCapableInterface, |
|
29 | - FormParentInterface |
|
28 | + DisableElementsCapableInterface, |
|
29 | + FormParentInterface |
|
30 | 30 | { |
31 | 31 | use EventManagerAwareTrait, HydratorStrategyAwareTrait; |
32 | 32 |
@@ -103,10 +103,10 @@ |
||
103 | 103 | */ |
104 | 104 | public function setFormId($formId) |
105 | 105 | { |
106 | - $this->formId = $formId . '-'; |
|
106 | + $this->formId = $formId.'-'; |
|
107 | 107 | |
108 | 108 | foreach ($this as $button) { |
109 | - $button->setAttribute('id', $this->formId . $button->getAttribute('id')); |
|
109 | + $button->setAttribute('id', $this->formId.$button->getAttribute('id')); |
|
110 | 110 | } |
111 | 111 | return $this; |
112 | 112 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | ) |
47 | 47 | ); |
48 | 48 | |
49 | - $timezones=array_merge( |
|
49 | + $timezones = array_merge( |
|
50 | 50 | \DateTimeZone::listIdentifiers(\DateTimeZone::AFRICA), |
51 | 51 | \DateTimeZone::listIdentifiers(\DateTimeZone::AMERICA), |
52 | 52 | \DateTimeZone::listIdentifiers(\DateTimeZone::ASIA), |