@@ -132,19 +132,19 @@ discard block |
||
| 132 | 132 | $this->registerLibraries(); |
| 133 | 133 | $this->registerClasses(); |
| 134 | 134 | // Get the default modal library |
| 135 | - if(($sName = $this->xConfigManager->getOption('dialogs.default.modal', ''))) |
|
| 135 | + if (($sName = $this->xConfigManager->getOption('dialogs.default.modal', ''))) |
|
| 136 | 136 | { |
| 137 | 137 | $this->aLibrariesInUse[] = $sName; |
| 138 | 138 | $xDialogFacade->setModalLibrary($sName); |
| 139 | 139 | } |
| 140 | 140 | // Get the configured message library |
| 141 | - if(($sName = $this->xConfigManager->getOption('dialogs.default.message', ''))) |
|
| 141 | + if (($sName = $this->xConfigManager->getOption('dialogs.default.message', ''))) |
|
| 142 | 142 | { |
| 143 | 143 | $this->aLibrariesInUse[] = $sName; |
| 144 | 144 | $xDialogFacade->setMessageLibrary($sName); |
| 145 | 145 | } |
| 146 | 146 | // Get the configured question library |
| 147 | - if(($sName = $this->xConfigManager->getOption('dialogs.default.question', ''))) |
|
| 147 | + if (($sName = $this->xConfigManager->getOption('dialogs.default.question', ''))) |
|
| 148 | 148 | { |
| 149 | 149 | $this->aLibrariesInUse[] = $sName; |
| 150 | 150 | $xDialogFacade->setQuestionLibrary($sName); |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | */ |
| 244 | 244 | protected function registerLibraries() |
| 245 | 245 | { |
| 246 | - foreach($this->aLibraries as $sName => $sClass) |
|
| 246 | + foreach ($this->aLibraries as $sName => $sClass) |
|
| 247 | 247 | { |
| 248 | 248 | $this->registerLibrary($sName, $sClass); |
| 249 | 249 | } |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | protected function registerClasses() |
| 258 | 258 | { |
| 259 | 259 | $aLibraries = $this->xConfigManager->getOptionNames('dialogs.classes'); |
| 260 | - foreach($aLibraries as $sShortName => $sFullName) |
|
| 260 | + foreach ($aLibraries as $sShortName => $sFullName) |
|
| 261 | 261 | { |
| 262 | 262 | $this->registerLibrary($sShortName, $this->xConfigManager->getOption($sFullName)); |
| 263 | 263 | } |
@@ -334,9 +334,9 @@ discard block |
||
| 334 | 334 | $aNames = array_merge($this->aLibrariesInUse, |
| 335 | 335 | $this->xConfigManager->getOption('dialogs.libraries', [])); |
| 336 | 336 | $aLibraries = []; |
| 337 | - foreach($aNames as $sName) |
|
| 337 | + foreach ($aNames as $sName) |
|
| 338 | 338 | { |
| 339 | - if(($xLibrary = $this->getLibrary($sName))) |
|
| 339 | + if (($xLibrary = $this->getLibrary($sName))) |
|
| 340 | 340 | { |
| 341 | 341 | $aLibraries[$xLibrary->getName()] = $xLibrary; |
| 342 | 342 | } |
@@ -76,13 +76,13 @@ discard block |
||
| 76 | 76 | $aOptions['title'] = $sTitle; |
| 77 | 77 | $aOptions['content'] = $sMessage; |
| 78 | 78 | $aOptions['buttons'] = []; |
| 79 | - if(!array_key_exists('boxWidth', $aOptions)) |
|
| 79 | + if (!array_key_exists('boxWidth', $aOptions)) |
|
| 80 | 80 | { |
| 81 | 81 | $aOptions['useBootstrap'] = false; |
| 82 | 82 | $aOptions['boxWidth'] = '600'; |
| 83 | 83 | } |
| 84 | 84 | $ind = 0; |
| 85 | - foreach($aButtons as $button) |
|
| 85 | + foreach ($aButtons as $button) |
|
| 86 | 86 | { |
| 87 | 87 | $_button = [ |
| 88 | 88 | 'text' => $button['title'], |
@@ -90,9 +90,9 @@ discard block |
||
| 90 | 90 | 'action' => $button['click'], |
| 91 | 91 | ]; |
| 92 | 92 | // Optional attributes |
| 93 | - foreach($button as $attr => $value) |
|
| 93 | + foreach ($button as $attr => $value) |
|
| 94 | 94 | { |
| 95 | - if(!in_array($attr, ['title', 'class', 'click'])) |
|
| 95 | + if (!in_array($attr, ['title', 'class', 'click'])) |
|
| 96 | 96 | { |
| 97 | 97 | $_button[$attr] = $value; |
| 98 | 98 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | protected function alert(string $sMessage, string $sTitle, string $sType, string $sIcon): string |
| 126 | 126 | { |
| 127 | - if($this->getReturn()) |
|
| 127 | + if ($this->getReturn()) |
|
| 128 | 128 | { |
| 129 | 129 | return "$.alert({content:" . $sMessage . ", title:'" . $sTitle . |
| 130 | 130 | "', type:'" . $sType . "', icon:'" . $sIcon . "'})"; |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | public function confirm(string $sQuestion, string $sYesScript, string $sNoScript): string |
| 173 | 173 | { |
| 174 | 174 | $sTitle = $this->getQuestionTitle(); |
| 175 | - if(!$sNoScript) |
|
| 175 | + if (!$sNoScript) |
|
| 176 | 176 | { |
| 177 | 177 | return "jaxon.dialogs.jconfirm.confirm(" . $sQuestion . ",'" . |
| 178 | 178 | $sTitle . "',function(){" . $sYesScript . ";})"; |