@@ -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 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $formContainerHelper = $view->formContainer(); |
62 | 62 | $formsMarkup = ''; |
63 | 63 | $formTemplateWrapper = '<div class="form-collection-container-form"> |
64 | - '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button>' : '') . ' |
|
64 | + '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">'.$translator->translate('Remove').'</button>' : '').' |
|
65 | 65 | %s |
66 | 66 | </div>'; |
67 | 67 | |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $container->getLabel(), |
88 | 88 | $formsMarkup, |
89 | 89 | $templateMarkup, |
90 | - '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button"><span class="yk-icon yk-icon-plus"></span> ' . sprintf($translator->translate('Add %s'), $container->getLabel()) . '</button></div>' |
|
90 | + '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button"><span class="yk-icon yk-icon-plus"></span> '.sprintf($translator->translate('Add %s'), $container->getLabel()).'</button></div>' |
|
91 | 91 | ); |
92 | 92 | } |
93 | 93 | /** |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | */ |
98 | 98 | public function setDisplayRemoveButton($displayRemoveButton) |
99 | 99 | { |
100 | - $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
100 | + $this->displayRemoveButton = (bool) $displayRemoveButton; |
|
101 | 101 | |
102 | 102 | return $this; |
103 | 103 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * @param array $colMap |
36 | 36 | * @return Form|string |
37 | 37 | */ |
38 | - public function __invoke(FormInterface $form = null, $colMap=null) |
|
38 | + public function __invoke(FormInterface $form = null, $colMap = null) |
|
39 | 39 | { |
40 | 40 | if (!$form) { |
41 | 41 | return $this; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | return $this->render($form, $colMap); |
45 | 45 | } |
46 | 46 | |
47 | - public function render(FormInterface $form, $colMap=null, $buttonsSpan = null) |
|
47 | + public function render(FormInterface $form, $colMap = null, $buttonsSpan = null) |
|
48 | 48 | { |
49 | 49 | $headscript = $this->getView()->plugin('headscript'); |
50 | 50 | $basepath = $this->getView()->plugin('basepath'); |
@@ -61,14 +61,14 @@ discard block |
||
61 | 61 | $form->prepare(); |
62 | 62 | |
63 | 63 | if ($form instanceof ViewPartialProviderInterface) { |
64 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
64 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
68 | 68 | |
69 | 69 | return $this->openTag($form) |
70 | 70 | . '<div class="row" style="padding: 0 15px;">' |
71 | - . $content . '</div>' . $this->closeTag(); |
|
71 | + . $content.'</div>'.$this->closeTag(); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function renderButtons($buttons) |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $button->removeAttribute('name'); |
81 | 81 | $attrs = $helper->createAttributesString($button->getAttributes()); |
82 | 82 | |
83 | - $content.= '<button ' . $attrs . '>' |
|
83 | + $content .= '<button '.$attrs.'>' |
|
84 | 84 | . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
85 | 85 | . '</button>'; |
86 | 86 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
92 | 92 | { |
93 | 93 | if ($form instanceof ViewPartialProviderInterface) { |
94 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
94 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if (null === $colMap) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $formElement = $this->getView()->plugin('formElement'); |
102 | 102 | $content = ''; |
103 | 103 | $buttonsRendered = false; |
104 | - $i=0; |
|
104 | + $i = 0; |
|
105 | 105 | foreach ($form as $element) { |
106 | 106 | if ($element instanceof Hidden) { |
107 | 107 | $content .= $formElement($element); |
@@ -117,14 +117,14 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | if ($element->getName() == $form->getButtonElement()) { |
120 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
120 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
121 | 121 | . $formElement($element) |
122 | 122 | . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
123 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
123 | + . $this->renderButtons($form->getButtons()).'</div>' |
|
124 | 124 | . '</div>'; |
125 | 125 | $buttonsRendered = true; |
126 | 126 | } else { |
127 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
127 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
128 | 128 | . $formElement($element) |
129 | 129 | . '</div>'; |
130 | 130 | } |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | if (null === $buttonsSpan) { |
137 | 137 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
138 | 138 | } |
139 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
140 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
139 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
140 | + . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>'; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | return $content; |
@@ -19,5 +19,5 @@ |
||
19 | 19 | { |
20 | 20 | protected $theme = 'light'; |
21 | 21 | |
22 | - protected $languagePath="modules/Core/js/tinymce-lang/"; |
|
22 | + protected $languagePath = "modules/Core/js/tinymce-lang/"; |
|
23 | 23 | } |
@@ -28,6 +28,6 @@ |
||
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 | } |
@@ -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 | } |