@@ -71,8 +71,8 @@ |
||
71 | 71 | $basepath = $renderer->plugin('basepath'); |
72 | 72 | |
73 | 73 | $headscript->appendFile($basepath('modules/Core/js/core.spinnerbutton.js')) |
74 | - //->appendFile($basepath('/assets/select2/js/select2.min.js')) |
|
75 | - ->appendFile($basepath('modules/Core/js/core.forms.js')); |
|
74 | + //->appendFile($basepath('/assets/select2/js/select2.min.js')) |
|
75 | + ->appendFile($basepath('modules/Core/js/core.forms.js')); |
|
76 | 76 | |
77 | 77 | /* @noinspection PhpParamsInspection */ |
78 | 78 | //$renderer->headLink()->appendStylesheet($basepath('/assets/select2/css/select2.css')); |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | |
89 | 89 | $class = $form->getAttribute('class'); |
90 | 90 | $class = preg_replace('~\bform-[^ ]+\b~', '', $class); |
91 | - $class .= ' ' . $layout; |
|
91 | + $class .= ' '.$layout; |
|
92 | 92 | |
93 | 93 | $form->setAttribute('class', $class); |
94 | 94 | |
95 | 95 | $formId = $form->getAttribute('id') ?: $form->getName(); |
96 | 96 | $formId = preg_replace( |
97 | 97 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
98 | - array('-' , '-' , '' ), |
|
98 | + array('-', '-', ''), |
|
99 | 99 | $formId |
100 | 100 | ); |
101 | 101 | $form->setAttribute( |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | if (!$elementId) { |
122 | 122 | $elementId = preg_replace( |
123 | 123 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
124 | - array('-' , '-', ''), |
|
124 | + array('-', '-', ''), |
|
125 | 125 | $element->getName() |
126 | 126 | ); |
127 | 127 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | } |
160 | 160 | } |
161 | 161 | |
162 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
162 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | ); |
188 | 188 | |
189 | 189 | if ($desc = $form->getOption('description', '')) { |
190 | - $descriptionParams=$form->getOption('description_params'); |
|
190 | + $descriptionParams = $form->getOption('description_params'); |
|
191 | 191 | $translator = $this->getTranslator(); |
192 | 192 | $textDomain = $this->getTranslatorTextDomain(); |
193 | 193 | $desc = $translator->translate($desc, $textDomain); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $desc |
209 | 209 | ); |
210 | 210 | } else { |
211 | - $formContent = '<div class="form-content">' . $formContent . '</div>'; |
|
211 | + $formContent = '<div class="form-content">'.$formContent.'</div>'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | $markup = '<div id="form-%s" class="form-container">' |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | . '</div>'; |
218 | 218 | |
219 | 219 | if ($label = $form->getLabel()) { |
220 | - $label = '<div class="form-headline"><h3>' . $renderer->translate($label) . '</h3></div>'; |
|
220 | + $label = '<div class="form-headline"><h3>'.$renderer->translate($label).'</h3></div>'; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | return sprintf( |
@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | protected function additionalOptions() |
21 | 21 | { |
22 | - return 'toolbar: "undo redo | styleselect forecolor | bold italic | alignleft aligncenter alignright alignjustify | ' . |
|
22 | + return 'toolbar: "undo redo | styleselect forecolor | bold italic | alignleft aligncenter alignright alignjustify | '. |
|
23 | 23 | 'bullist numlist outdent indent ", '; |
24 | 24 | } |
25 | 25 | } |
@@ -39,11 +39,11 @@ |
||
39 | 39 | $element->setLabel(''); |
40 | 40 | $element->setAttribute('placeholder', $label); |
41 | 41 | } |
42 | - $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE) . ' '; |
|
42 | + $formContent .= $this->getView()->formRow($element, null, null, Form::LAYOUT_BARE).' '; |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
47 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
48 | 48 | } |
49 | 49 | } |
@@ -36,12 +36,12 @@ |
||
36 | 36 | $formContent = ''; |
37 | 37 | foreach ($form as $element) { |
38 | 38 | if ($element instanceof FieldsetInterface) { |
39 | - $formContent.= $this->getView()->formCollection($element); |
|
39 | + $formContent .= $this->getView()->formCollection($element); |
|
40 | 40 | } else { |
41 | - $formContent.= $this->getView()->formRowSimple($element); |
|
41 | + $formContent .= $this->getView()->formRowSimple($element); |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 | |
45 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
45 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
46 | 46 | } |
47 | 47 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | |
64 | 64 | return sprintf( |
65 | - '<div class="controls controls-row ' . $form_row_class . '">%s%s</div>', |
|
65 | + '<div class="controls controls-row '.$form_row_class.'">%s%s</div>', |
|
66 | 66 | $labelMarkup, |
67 | 67 | $markups |
68 | 68 | ); |
@@ -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 | } |
@@ -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 | } |