@@ -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 | } |
@@ -134,8 +134,8 @@ |
||
134 | 134 | $elementOptions = $element->getOptions(); |
135 | 135 | if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) { |
136 | 136 | $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . |
137 | - (empty($content)?'':'display:none;') . |
|
138 | - '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
137 | + (empty($content)?'':'display:none;') . |
|
138 | + '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
139 | 139 | } |
140 | 140 | return |
141 | 141 | $placeHolder |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @var string |
46 | 46 | */ |
47 | - protected $language="de"; |
|
47 | + protected $language = "de"; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * @var |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function render(ElementInterface $element) |
60 | 60 | { |
61 | - $name = $element->getName(); |
|
61 | + $name = $element->getName(); |
|
62 | 62 | if (empty($name) && $name !== 0) { |
63 | 63 | throw new \DomainException( |
64 | 64 | sprintf( |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | $headscript->prependFile($basepath('/assets/jquery/jquery.min.js')); |
83 | 83 | |
84 | 84 | $headscript->offsetSetScript( |
85 | - '1000_tinymce_' . $this->getTheme(), |
|
85 | + '1000_tinymce_'.$this->getTheme(), |
|
86 | 86 | ' |
87 | 87 | $(document).ready(function() { |
88 | - tinyMCE.init({' . $this->additionalOptions() . ', |
|
88 | + tinyMCE.init({' . $this->additionalOptions().', |
|
89 | 89 | setup: function(editor) { |
90 | 90 | setPlaceHolder = function(editor, show) { |
91 | 91 | placeHolder = $("#placeholder-" + editor.id); |
@@ -131,15 +131,15 @@ discard block |
||
131 | 131 | } |
132 | 132 | if (is_string($content)) { |
133 | 133 | |
134 | - $class = array_key_exists('class', $attributes)?$attributes['class']:''; |
|
135 | - $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme(); |
|
134 | + $class = array_key_exists('class', $attributes) ? $attributes['class'] : ''; |
|
135 | + $class .= (empty($class) ?: ' ').' tinymce_'.$this->getTheme(); |
|
136 | 136 | $attributes['class'] = $class; |
137 | 137 | $placeHolder = ''; |
138 | 138 | $elementOptions = $element->getOptions(); |
139 | 139 | if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) { |
140 | - $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' . |
|
141 | - (empty($content)?'':'display:none;') . |
|
142 | - '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>'; |
|
140 | + $placeHolder = '<div id="placeholder-'.$name.'" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;'. |
|
141 | + (empty($content) ? '' : 'display:none;'). |
|
142 | + '">'.$this->translator->translate($elementOptions['placeholder']).'</div>'; |
|
143 | 143 | } |
144 | 144 | return |
145 | 145 | $placeHolder |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | * @param $language |
178 | 178 | */ |
179 | 179 | public function setLanguage($language) { |
180 | - $this->language=$language; |
|
180 | + $this->language = $language; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | * @param $languagePath |
187 | 187 | */ |
188 | 188 | public function setLanguagePath($languagePath) { |
189 | - $this->languagePath=$languagePath; |
|
189 | + $this->languagePath = $languagePath; |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * @param $name |
196 | 196 | * @param $value |
197 | 197 | */ |
198 | - public function setOption($name,$value){ |
|
198 | + public function setOption($name, $value) { |
|
199 | 199 | $this->options[$name] = $value; |
200 | 200 | |
201 | 201 | return $this; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | */ |
209 | 209 | public function setOptions($options) |
210 | 210 | { |
211 | - foreach($options as $key => $val) { |
|
211 | + foreach ($options as $key => $val) { |
|
212 | 212 | $this->setOption($key, $val); |
213 | 213 | } |
214 | 214 | } |
@@ -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 |
@@ -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 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | if (null === $buttonContent) { |
28 | 28 | throw new Exception\DomainException( |
29 | 29 | sprintf( |
30 | - '%s expects either button content as the second argument, ' . |
|
30 | + '%s expects either button content as the second argument, '. |
|
31 | 31 | 'or that the element provided has a label value; neither found', |
32 | 32 | __METHOD__ |
33 | 33 | ) |
@@ -45,8 +45,8 @@ discard block |
||
45 | 45 | |
46 | 46 | $escape = $this->getEscapeHtmlHelper(); |
47 | 47 | $translator = $this->getTranslator(); |
48 | - $buttonContent = '<div><div class="processing yk-hidden"><span class="fa-spin yk-icon-spinner yk-icon"></span> ' . $translator->translate('processing', $this->getTranslatorTextDomain()) . '</div><div class="default">' . $escape($buttonContent) . '</div></div>'; |
|
48 | + $buttonContent = '<div><div class="processing yk-hidden"><span class="fa-spin yk-icon-spinner yk-icon"></span> '.$translator->translate('processing', $this->getTranslatorTextDomain()).'</div><div class="default">'.$escape($buttonContent).'</div></div>'; |
|
49 | 49 | |
50 | - return $openTag . $buttonContent . $this->closeTag(); |
|
50 | + return $openTag.$buttonContent.$this->closeTag(); |
|
51 | 51 | } |
52 | 52 | } |
@@ -31,15 +31,15 @@ |
||
31 | 31 | |
32 | 32 | if ($file) { |
33 | 33 | if (0 === strpos($file->getType(), 'image/')) { |
34 | - $basepath = $this->getView()->plugin('basepath'); |
|
35 | - $preview = '<img src="' . $basepath($file->getUri()) . '" class="img-polaroid" />'; |
|
34 | + $basepath = $this->getView()->plugin('basepath'); |
|
35 | + $preview = '<img src="'.$basepath($file->getUri()).'" class="img-polaroid" />'; |
|
36 | 36 | } else { |
37 | - $preview = '<span>' . $file->getName() . '(' . $file->getPrettySize() . ')</span>'; |
|
37 | + $preview = '<span>'.$file->getName().'('.$file->getPrettySize().')</span>'; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | $notice = '<div class="iu-empty-notice" style="padding: 10px; color: lightgrey;"> |
41 | 41 | <div style="padding: 0px 20px 5px;"><span class="yk-icon fa-file-image-o fa-5x"></span></div> |
42 | - <small>' . $translator->translate('Click here to add an image or use drag and drop.') . '</small> |
|
42 | + <small>' . $translator->translate('Click here to add an image or use drag and drop.').'</small> |
|
43 | 43 | |
44 | 44 | </div>'; |
45 | 45 |
@@ -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 | } |
@@ -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 | } |