@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | : ''; |
59 | 59 | |
60 | 60 | if (false !== strpos($urlOrEmail, '@')) { |
61 | - $urlOrEmail = 'mailto:' . $urlOrEmail; |
|
61 | + $urlOrEmail = 'mailto:'.$urlOrEmail; |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | return sprintf('<a %s href="%s">%s</a>', $attributesStr, $urlOrEmail, $label); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $attr = array(); |
74 | 74 | |
75 | 75 | foreach ($attributes as $name => $value) { |
76 | - $attr[] = $escape($name) . '="' . $escapeAttr($value) . '"'; |
|
76 | + $attr[] = $escape($name).'="'.$escapeAttr($value).'"'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | return implode(' ', $attr); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | protected function checkObjectType($object) |
58 | 58 | { |
59 | 59 | if (!$object instanceof $this->objectType) { |
60 | - throw new \InvalidArgumentException('Wrapped entity must be of type ' . $this->objectType); |
|
60 | + throw new \InvalidArgumentException('Wrapped entity must be of type '.$this->objectType); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
@@ -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 | } |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | |
53 | 53 | if ($element instanceof ViewPartialProviderInterface && !$ignoreViewPartial) { |
54 | 54 | return $this->getView()->partial($element->getViewPartial(), |
55 | - array( |
|
56 | - 'element' => $element, |
|
57 | - 'labelWitdh' => $labelWidth, |
|
58 | - 'label_attributes' => $labelAttributes |
|
55 | + array( |
|
56 | + 'element' => $element, |
|
57 | + 'labelWitdh' => $labelWidth, |
|
58 | + 'label_attributes' => $labelAttributes |
|
59 | 59 | ) |
60 | 60 | ); |
61 | 61 | } |
@@ -107,10 +107,10 @@ discard block |
||
107 | 107 | $desc = $element->getOption('description', false); |
108 | 108 | if ($desc && $this->layout != Form::LAYOUT_BARE) { |
109 | 109 | if (null !== ($translator = $this->getTranslator())) { |
110 | - $desc = $translator->translate( |
|
111 | - $desc, |
|
112 | - $this->getTranslatorTextDomain() |
|
113 | - ); |
|
110 | + $desc = $translator->translate( |
|
111 | + $desc, |
|
112 | + $this->getTranslatorTextDomain() |
|
113 | + ); |
|
114 | 114 | } |
115 | 115 | $elementString .= sprintf( |
116 | 116 | '<div id="%s-desc" class="cam-description alert alert-info">%s</div>', |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | |
77 | 77 | // Does this element have errors ? |
78 | 78 | if (!empty($elementErrors) && !empty($inputErrorClass) && $this->layout != Form::LAYOUT_BARE) { |
79 | - $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : ''); |
|
80 | - $classAttributes = $classAttributes . $inputErrorClass; |
|
79 | + $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class').' ' : ''); |
|
80 | + $classAttributes = $classAttributes.$inputErrorClass; |
|
81 | 81 | |
82 | 82 | $element->setAttribute('class', $classAttributes); |
83 | 83 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | if (!$element->hasAttribute('id')) { |
86 | 86 | $elementId = preg_replace( |
87 | 87 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
88 | - array('-' , '-', ''), |
|
88 | + array('-', '-', ''), |
|
89 | 89 | $element->getName() |
90 | 90 | ); |
91 | 91 | $element->setAttribute('id', $elementId); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | // moved label here so we can change it in the ElementViewHelper |
134 | - $label = $element->getLabel(); |
|
134 | + $label = $element->getLabel(); |
|
135 | 135 | if (isset($label) && '' !== $label && !$element instanceof \Zend\Form\Element\Button) { |
136 | 136 | // Translate the label |
137 | 137 | if (null !== ($translator = $this->getTranslator())) { |
@@ -173,11 +173,11 @@ discard block |
||
173 | 173 | } |
174 | 174 | $element->setLabelAttributes($labelAttributes); |
175 | 175 | |
176 | - $label = $labelHelper($element,$label); |
|
176 | + $label = $labelHelper($element, $label); |
|
177 | 177 | if ($this->shouldWrap) { |
178 | 178 | $spanWidth = 12 - $labelWidth; |
179 | 179 | $elementString = sprintf( |
180 | - '<div class="col-md-%d%s" id="' . $elementId . '-span">%s</div>', |
|
180 | + '<div class="col-md-%d%s" id="'.$elementId.'-span">%s</div>', |
|
181 | 181 | $spanWidth, |
182 | 182 | $elementErrors ? " $inputErrorClass" : '', |
183 | 183 | $elementString |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | ); |
190 | 190 | |
191 | 191 | } |
192 | - $markup = $label . $elementString; |
|
192 | + $markup = $label.$elementString; |
|
193 | 193 | } |
194 | 194 | } |
195 | 195 | } else { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | && !$element instanceof \Zend\Form\Element\Button |
211 | 211 | && $this->layout != Form::LAYOUT_BARE |
212 | 212 | ) { |
213 | - $markup = sprintf('<div class="controls controls-row ' . $form_row_class . '">%s</div>', $markup); |
|
213 | + $markup = sprintf('<div class="controls controls-row '.$form_row_class.'">%s</div>', $markup); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | return $markup; |
@@ -71,8 +71,8 @@ |
||
71 | 71 | $basepath = $renderer->plugin('basepath'); |
72 | 72 | |
73 | 73 | $headscript->appendFile($basepath('Core/js/core.spinnerbutton.js')) |
74 | - ->appendFile($basepath('js/select2.min.js')) |
|
75 | - ->appendFile($basepath('Core/js/core.forms.js')); |
|
74 | + ->appendFile($basepath('js/select2.min.js')) |
|
75 | + ->appendFile($basepath('Core/js/core.forms.js')); |
|
76 | 76 | |
77 | 77 | /* @noinspection PhpParamsInspection */ |
78 | 78 | $renderer->headLink()->appendStylesheet($basepath('css/select2.css')); |
@@ -88,7 +88,7 @@ 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 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | 'id', |
98 | 98 | preg_replace( |
99 | 99 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
100 | - array('-' , '-' , '' ), |
|
100 | + array('-', '-', ''), |
|
101 | 101 | $formId |
102 | 102 | ) |
103 | 103 | ); |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | if (!$element->hasAttribute('id')) { |
119 | 119 | $elementId = preg_replace( |
120 | 120 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
121 | - array('-' , '-', ''), |
|
121 | + array('-', '-', ''), |
|
122 | 122 | $element->getName() |
123 | 123 | ); |
124 | 124 | $element->setAttribute('id', $elementId); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | - return $this->openTag($form) . $formContent . $this->closeTag(); |
|
159 | + return $this->openTag($form).$formContent.$this->closeTag(); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | ); |
185 | 185 | |
186 | 186 | if ($desc = $form->getOption('description', '')) { |
187 | - $descriptionParams=$form->getOption('description_params'); |
|
187 | + $descriptionParams = $form->getOption('description_params'); |
|
188 | 188 | $translator = $this->getTranslator(); |
189 | 189 | $textDomain = $this->getTranslatorTextDomain(); |
190 | 190 | $desc = $translator->translate($desc, $textDomain); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | $desc |
206 | 206 | ); |
207 | 207 | } else { |
208 | - $formContent = '<div class="form-content">' . $formContent . '</div>'; |
|
208 | + $formContent = '<div class="form-content">'.$formContent.'</div>'; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | $markup = '<div id="form-%s" class="form-container">' |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | . '</div>'; |
215 | 215 | |
216 | 216 | if ($label = $form->getLabel()) { |
217 | - $label = '<div class="form-headline"><h3>' . $renderer->translate($label) . '</h3></div>'; |
|
217 | + $label = '<div class="form-headline"><h3>'.$renderer->translate($label).'</h3></div>'; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | return sprintf( |
@@ -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( |
@@ -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 | /** |
@@ -48,8 +48,8 @@ |
||
48 | 48 | } |
49 | 49 | $linktext = $translator->translate($linktext); |
50 | 50 | $link = '<a data-toggle="modal" href="' . $href . '" ' |
51 | - . 'data-target="#modal-' . $element->getAttribute('id') . '">' |
|
52 | - . $linktext . '</a>'; |
|
51 | + . 'data-target="#modal-' . $element->getAttribute('id') . '">' |
|
52 | + . $linktext . '</a>'; |
|
53 | 53 | |
54 | 54 | $label = sprintf($label, $link); |
55 | 55 | } |
@@ -44,26 +44,26 @@ discard block |
||
44 | 44 | $href = $this->getView()->url($route, $params, true); |
45 | 45 | } else { |
46 | 46 | /*@todo add more options like providing url... */ |
47 | - $href=""; |
|
47 | + $href = ""; |
|
48 | 48 | } |
49 | 49 | $linktext = $translator->translate($linktext); |
50 | - $link = '<a data-toggle="modal" href="' . $href . '" ' |
|
51 | - . 'data-target="#modal-' . $element->getAttribute('id') . '">' |
|
52 | - . $linktext . '</a>'; |
|
50 | + $link = '<a data-toggle="modal" href="'.$href.'" ' |
|
51 | + . 'data-target="#modal-'.$element->getAttribute('id').'">' |
|
52 | + . $linktext.'</a>'; |
|
53 | 53 | |
54 | 54 | $label = sprintf($label, $link); |
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | if ($headline) { |
59 | - $headline = '<h6>' . $translator->translate($headline, $textDomain) . '</h6>'; |
|
59 | + $headline = '<h6>'.$translator->translate($headline, $textDomain).'</h6>'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | $markup = ' |
63 | 63 | <div class="checkbox"> |
64 | 64 | <label for="%s">%s %s</label> |
65 | 65 | </div> |
66 | - <div class="modal fade modal-scrollable" id="modal-' . $element->getAttribute('id') . '" tabindex="-1" role="dialog" aria-labelledby="label-search-user" aria-hidden="true"> |
|
66 | + <div class="modal fade modal-scrollable" id="modal-' . $element->getAttribute('id').'" tabindex="-1" role="dialog" aria-labelledby="label-search-user" aria-hidden="true"> |
|
67 | 67 | <div class="modal-dialog modal-lg"> |
68 | 68 | <div class="modal-content"> |
69 | 69 | </div> |
@@ -77,6 +77,6 @@ discard block |
||
77 | 77 | $label |
78 | 78 | ); |
79 | 79 | |
80 | - return $headline . $markup; |
|
80 | + return $headline.$markup; |
|
81 | 81 | } |
82 | 82 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | use Zend\Form\ElementInterface; |
16 | 16 | use Zend\Form\Exception; |
17 | 17 | |
18 | -class RequiredMarkInFormLabel extends FormLabel{ |
|
18 | +class RequiredMarkInFormLabel extends FormLabel { |
|
19 | 19 | public function __invoke(ElementInterface $element = null, $labelContent = null, $position = null) |
20 | 20 | { |
21 | 21 | // Set $required to a default of true | existing elements required-value |
@@ -28,6 +28,6 @@ discard block |
||
28 | 28 | ); |
29 | 29 | } |
30 | 30 | |
31 | - return $this->openTag($element) . $labelContent . $this->closeTag(); |
|
31 | + return $this->openTag($element).$labelContent.$this->closeTag(); |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | \ No newline at end of file |