@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if (!$elementId) { |
70 | 70 | $elementId = preg_replace( |
71 | 71 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
72 | - array('-' , '-' , '' ), |
|
72 | + array('-', '-', ''), |
|
73 | 73 | $element->getName() |
74 | 74 | ); |
75 | 75 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | if (!$elementOrFieldsetId) { |
105 | 105 | $elementOrFieldsetId = preg_replace( |
106 | 106 | array('~[^A-Za-z0-9_-]~', '~--+~', '~^-|-$~'), |
107 | - array('-' , '-' , '' ), |
|
107 | + array('-', '-', ''), |
|
108 | 108 | $elementOrFieldset->getName() |
109 | 109 | ); |
110 | 110 | } |
@@ -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 | } |
@@ -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 |
@@ -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 | } |
@@ -65,10 +65,12 @@ |
||
65 | 65 | %s |
66 | 66 | </div>'; |
67 | 67 | |
68 | - foreach ($container as $form) /* @var $form \Zend\Form\Form */ |
|
68 | + foreach ($container as $form) { |
|
69 | + /* @var $form \Zend\Form\Form */ |
|
69 | 70 | { |
70 | 71 | $formsMarkup .= sprintf($formTemplateWrapper, $formContainerHelper->renderElement($form, $layout, $parameter)); |
71 | 72 | } |
73 | + } |
|
72 | 74 | |
73 | 75 | $templateForm = $container->getTemplateForm(); |
74 | 76 | $templateMarkup = sprintf( |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
68 | 68 | |
69 | 69 | return $this->openTag($form) |
70 | - . '<div class="row" style="padding: 0 15px;">' |
|
71 | - . $content . '</div>' . $this->closeTag(); |
|
70 | + . '<div class="row" style="padding: 0 15px;">' |
|
71 | + . $content . '</div>' . $this->closeTag(); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function renderButtons($buttons) |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | $attrs = $helper->createAttributesString($button->getAttributes()); |
82 | 82 | |
83 | 83 | $content.= '<button ' . $attrs . '>' |
84 | - . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
85 | - . '</button>'; |
|
84 | + . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
85 | + . '</button>'; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | return $content; |
@@ -118,15 +118,15 @@ discard block |
||
118 | 118 | |
119 | 119 | if ($element->getName() == $form->getButtonElement()) { |
120 | 120 | $content.='<div class="input-group col-md-' . $cols . '">' |
121 | - . $formElement($element) |
|
122 | - . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
123 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
124 | - . '</div>'; |
|
121 | + . $formElement($element) |
|
122 | + . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
123 | + . $this->renderButtons($form->getButtons()) . '</div>' |
|
124 | + . '</div>'; |
|
125 | 125 | $buttonsRendered = true; |
126 | 126 | } else { |
127 | 127 | $content .= '<div class="input-group col-md-' . $cols . '">' |
128 | - . $formElement($element) |
|
129 | - . '</div>'; |
|
128 | + . $formElement($element) |
|
129 | + . '</div>'; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | $i += 1; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
138 | 138 | } |
139 | 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>'; |
|
140 | + . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | return $content; |
@@ -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 | } |
@@ -113,11 +113,11 @@ discard block |
||
113 | 113 | |
114 | 114 | return str_replace( |
115 | 115 | array('#abort', |
116 | - '__file-uri__', |
|
117 | - '__file-name__', |
|
118 | - '__file-size__', |
|
119 | - 'fu-working', |
|
120 | - 'fa-file-o' |
|
116 | + '__file-uri__', |
|
117 | + '__file-name__', |
|
118 | + '__file-size__', |
|
119 | + 'fu-working', |
|
120 | + 'fa-file-o' |
|
121 | 121 | ), |
122 | 122 | array("$uri?do=delete", $uri, $name, $size, '', $icon), |
123 | 123 | $template |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>' |
141 | 141 | . $this->getNonEmptyNotice() . '</div>'; |
142 | 142 | $emptynotice = '<div class="fu-empty-notice"' |
143 | - . ('' == trim($preview) ? '' : ' style="display: none;"') . '> |
|
143 | + . ('' == trim($preview) ? '' : ' style="display: none;"') . '> |
|
144 | 144 | ' . $this->getEmptyNotice() . ' |
145 | 145 | </div>'; |
146 | 146 |
@@ -90,12 +90,12 @@ discard block |
||
90 | 90 | </a> |
91 | 91 | <div class="fu-errors input-error"> |
92 | 92 | <ul class="errors"> |
93 | - <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain) . '</li> |
|
94 | - <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain) . '</li> |
|
93 | + <li class="fu-error-size">' . $translator->translate('The file is too big', $textDomain).'</li> |
|
94 | + <li class="fu-error-type">' . $translator->translate('The file type is not supported', $textDomain).'</li> |
|
95 | 95 | <li class="fu-error-count">' . sprintf( |
96 | 96 | $translator->translate('You may only upload %d files', $textDomain), |
97 | 97 | $element->getAttribute('data-maxfilecount') |
98 | -) . '</li><li class="fu-error-general">' . $translator->translate('An unknown error occured.') . '</li> |
|
98 | +).'</li><li class="fu-error-general">'.$translator->translate('An unknown error occured.').'</li> |
|
99 | 99 | </ul> |
100 | 100 | </div> |
101 | 101 | </li>'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /* @var $basepath \Zend\View\Helper\BasePath */ |
104 | 104 | $renderer = $this->getView(); |
105 | 105 | $basepath = $renderer->plugin('basepath'); |
106 | - $createFileDisplay = function ($file) use ($template, $basepath) { |
|
106 | + $createFileDisplay = function($file) use ($template, $basepath) { |
|
107 | 107 | /* @var $file \Core\Entity\FileInterface */ |
108 | 108 | $uri = $basepath($file->getUri()); |
109 | 109 | $name = $file->getName(); |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | $nonemptynotice = |
140 | - '<div class="fu-nonempty-notice"' . ('' == trim($preview) ? ' style="display:none;"' : '') . '>' |
|
141 | - . $this->getNonEmptyNotice() . '</div>'; |
|
140 | + '<div class="fu-nonempty-notice"'.('' == trim($preview) ? ' style="display:none;"' : '').'>' |
|
141 | + . $this->getNonEmptyNotice().'</div>'; |
|
142 | 142 | $emptynotice = '<div class="fu-empty-notice"' |
143 | - . ('' == trim($preview) ? '' : ' style="display: none;"') . '> |
|
144 | - ' . $this->getEmptyNotice() . ' |
|
143 | + . ('' == trim($preview) ? '' : ' style="display: none;"').'> |
|
144 | + ' . $this->getEmptyNotice().' |
|
145 | 145 | </div>'; |
146 | 146 | |
147 | 147 | $markup = ' |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | protected function getDefaultNotice() |
290 | 290 | { |
291 | - return '<small>' . $this->getTranslator()->translate('Click here to add files or use drag and drop.') . '</small>'; |
|
291 | + return '<small>'.$this->getTranslator()->translate('Click here to add files or use drag and drop.').'</small>'; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | */ |
299 | 299 | public function setAllowRemove($allowRemove) |
300 | 300 | { |
301 | - $this->allowRemove = (bool)$allowRemove; |
|
301 | + $this->allowRemove = (bool) $allowRemove; |
|
302 | 302 | |
303 | 303 | return $this; |
304 | 304 | } |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | */ |
311 | 311 | public function setAllowClickableDropZone($allowClickableDropZone) |
312 | 312 | { |
313 | - $this->allowClickableDropZone = (bool)$allowClickableDropZone; |
|
313 | + $this->allowClickableDropZone = (bool) $allowClickableDropZone; |
|
314 | 314 | |
315 | 315 | return $this; |
316 | 316 | } |