@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | $sizePolicy = 'customsection-field-box '; |
| 320 | 320 | $sizePolicy .= isset($parameters['sizePolicy']) ? $parameters['sizePolicy'] : ''; |
| 321 | 321 | $sizePolicy .= isset($parameters['transparentBackground']) && $parameters['transparentBackground'] ? 'customsection-field-box-transparentBackground' : ''; |
| 322 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 322 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 323 | 323 | |
| 324 | 324 | if (!$isGroupField && method_exists($this, $displayFieldMethod)) { |
| 325 | 325 | $widget = $this->$displayFieldMethod($customSection, $label); |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $parameters = $displayField['parameters']; |
| 401 | 401 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 402 | 402 | $label = isset($parameters['label']) && !empty($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : null; |
| 403 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 403 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 404 | 404 | $sizePolicy = 'customsection-field-box '; |
| 405 | 405 | $sizePolicy .= isset($parameters['sizePolicy']) ? $parameters['sizePolicy'] : ''; |
| 406 | 406 | if (!$isGroupField && method_exists($this, $displayFieldMethod)) { |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | $labelField = isset($field['parameters']['label']) ? $field['parameters']['label'] : ''; |
| 467 | 467 | $itemClass = isset($field['parameters']['classname']) ? $field['parameters']['classname'] : ''; |
| 468 | 468 | $displayFieldName = $field['fieldname']; |
| 469 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 469 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 470 | 470 | if (strpos($displayFieldMethod, '__subSection') !== false) { |
| 471 | 471 | $item = $this->__subSection($customSection, $field); |
| 472 | 472 | if (!isset($item) || count($item->getItems()) == 0) { |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $labelField = isset($field['parameters']['label']) ? $field['parameters']['label'] : ''; |
| 515 | 515 | $itemClass = isset($field['parameters']['classname']) ? $field['parameters']['classname'] : ''; |
| 516 | 516 | $displayFieldName = $field['fieldname']; |
| 517 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 517 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 518 | 518 | if (strpos($displayFieldMethod, '__fieldsGroup') !== false) { |
| 519 | 519 | $item = $this->__fieldsGroup($customSection, $field); |
| 520 | 520 | if (count($item->getItems()) == 0) { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->setHiddenValue('customfield[id]', $customfield->id); |
| 62 | 62 | $values = $customfield->getValues(); |
| 63 | 63 | |
| 64 | - if (! empty($this->customfield->enumvalues)) { |
|
| 64 | + if (!empty($this->customfield->enumvalues)) { |
|
| 65 | 65 | $values['enumvalues'] = unserialize($this->customfield->enumvalues); |
| 66 | 66 | } else { |
| 67 | 67 | $values['enumvalues'] = array( |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $fieldValuesItem->addItem($W->Label($App->translate('List of available values'))); |
| 185 | 185 | $values = array(); |
| 186 | 186 | |
| 187 | - if (isset($this->customfield) && ! empty($this->customfield->enumvalues)) { |
|
| 187 | + if (isset($this->customfield) && !empty($this->customfield->enumvalues)) { |
|
| 188 | 188 | $values = unserialize($this->customfield->enumvalues); |
| 189 | 189 | |
| 190 | 190 | foreach ($values as $name => $text) { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | use Capwelton\Widgets\Widgets\Helpers\WidgetAction; |
| 31 | 31 | use Cofy\Exception\BabUnknownActionException; |
| 32 | 32 | |
| 33 | -require_once dirname(__FILE__) . '/functions.php'; |
|
| 33 | +require_once dirname(__FILE__).'/functions.php'; |
|
| 34 | 34 | |
| 35 | 35 | $App = app_App(); |
| 36 | 36 | |
@@ -39,5 +39,5 @@ discard block |
||
| 39 | 39 | $action = WidgetAction::fromRequest(); |
| 40 | 40 | $controller->execute($action); |
| 41 | 41 | } catch (BabUnknownActionException $e) { |
| 42 | - die('<div class="app-error">' . $App->translate('We have a problem finding this page...') . '</div>'); |
|
| 42 | + die('<div class="app-error">'.$App->translate('We have a problem finding this page...').'</div>'); |
|
| 43 | 43 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | if (null === $url) { |
| 123 | 123 | $script = '<script type="text/javascript">'; |
| 124 | 124 | if (isset($message)) { |
| 125 | - $script .= 'alert("' . bab_toHtml($message, BAB_HTML_JS) . '");'; |
|
| 125 | + $script .= 'alert("'.bab_toHtml($message, BAB_HTML_JS).'");'; |
|
| 126 | 126 | } |
| 127 | 127 | $script .= 'history.back();'; |
| 128 | 128 | $script .= '</script>'; |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | $url = $url->url(); |
| 135 | 135 | } |
| 136 | 136 | if (!empty($babBody->msgerror)) { |
| 137 | - $url .= '&msgerror=' . urlencode($babBody->msgerror); |
|
| 137 | + $url .= '&msgerror='.urlencode($babBody->msgerror); |
|
| 138 | 138 | } |
| 139 | 139 | if (isset($message)) { |
| 140 | 140 | $lines = explode("\n", $message); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - header('Location: ' . $url); |
|
| 146 | + header('Location: '.$url); |
|
| 147 | 147 | die; |
| 148 | 148 | } |
| 149 | 149 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | $hour = '00:00:00'; |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | - return $date . ' ' . $hour; |
|
| 235 | + return $date.' '.$hour; |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | public function getPackageName() |
| 103 | 103 | { |
| 104 | - if (! isset($this->packageName) || empty($this->packageName)) { |
|
| 104 | + if (!isset($this->packageName) || empty($this->packageName)) { |
|
| 105 | 105 | $packageName = ''; |
| 106 | 106 | $setRc = new \ReflectionClass($this->set); |
| 107 | 107 | // Tries to automatically retrieve the package name from the definition.json |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | */ |
| 145 | 145 | public function controller($proxy = true) |
| 146 | 146 | { |
| 147 | - if (! isset($this->controllerObject)) { |
|
| 147 | + if (!isset($this->controllerObject)) { |
|
| 148 | 148 | $this->app->includeRecordController(); |
| 149 | 149 | $ctrl = $this->controller; |
| 150 | 150 | $this->controllerObject = new $ctrl($this->app, $this); |
@@ -169,9 +169,9 @@ discard block |
||
| 169 | 169 | public function ui() |
| 170 | 170 | { |
| 171 | 171 | $this->app->includeUi(); |
| 172 | - if (! isset($this->uiObject)) { |
|
| 172 | + if (!isset($this->uiObject)) { |
|
| 173 | 173 | $ui = $this->ui; |
| 174 | - if (! isset($ui)) { |
|
| 174 | + if (!isset($ui)) { |
|
| 175 | 175 | return null; |
| 176 | 176 | } |
| 177 | 177 | $this->uiObject = new $ui($this->app); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | |
| 205 | 205 | public function getDefinition() |
| 206 | 206 | { |
| 207 | - $componentDefinitionObjectName = 'Capwelton\App\\' . $this->getPackageName() . '\ComponentDefinition\ComponentDefinition'; |
|
| 207 | + $componentDefinitionObjectName = 'Capwelton\App\\'.$this->getPackageName().'\ComponentDefinition\ComponentDefinition'; |
|
| 208 | 208 | if (class_exists($componentDefinitionObjectName)) { |
| 209 | 209 | return new $componentDefinitionObjectName(); |
| 210 | 210 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | public function hasNoAccess(AppRecordSet $recordSet, $accessType, $user = null) |
| 100 | 100 | { |
| 101 | 101 | $criterion = $this->getAccessCriterion($recordSet, $accessType, $user); |
| 102 | - if (! $criterion instanceof ORMFalseCriterion) { |
|
| 102 | + if (!$criterion instanceof ORMFalseCriterion) { |
|
| 103 | 103 | return false; |
| 104 | 104 | } |
| 105 | 105 | return true; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $App = $this->App(); |
| 103 | 103 | |
| 104 | 104 | $recordClassname = $this->getRecordClassName(); |
| 105 | - $recordSetClassname = $recordClassname . 'Set'; |
|
| 105 | + $recordSetClassname = $recordClassname.'Set'; |
|
| 106 | 106 | |
| 107 | 107 | $recordSet = $App->$recordSetClassname(); |
| 108 | 108 | return $recordSet; |
@@ -150,9 +150,9 @@ discard block |
||
| 150 | 150 | if ($showLabel) { |
| 151 | 151 | $text = $actions->getTitle(); |
| 152 | 152 | } |
| 153 | - $html = '<li><a class="icon ' . $actions->getIcon() . '" href="' . $actions->url() . '">' . $text . '</a></li>'; |
|
| 153 | + $html = '<li><a class="icon '.$actions->getIcon().'" href="'.$actions->url().'">'.$text.'</a></li>'; |
|
| 154 | 154 | } elseif ($actions instanceof WidgetDisplayableInterface) { |
| 155 | - $html = '<li>' . $actions->display($canvas) . '</li>'; |
|
| 155 | + $html = '<li>'.$actions->display($canvas).'</li>'; |
|
| 156 | 156 | } elseif (is_array($actions)) { |
| 157 | 157 | if (isset($actions['items'])) { |
| 158 | 158 | $items = $actions['items']; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | } |
| 165 | 165 | if (isset($actions['icon'])) { |
| 166 | 166 | |
| 167 | - $html = '<li class="dropdown">' . '<a href="#" class="' . $actions['icon'] . ' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">' . ($actions['icon'] === 'actions-context-menu'/*FuncIcons::ACTIONS_CONTEXT_MENU*/ ? '' : '<span class="caret"></span>') . '</a>' . '<ul class="dropdown-menu dropdown-menu-right ' . FuncIcons::ICON_LEFT_SYMBOLIC . '">' . $html . '</ul>'; |
|
| 167 | + $html = '<li class="dropdown">'.'<a href="#" class="'.$actions['icon'].' icon dropdown-toogle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">'.($actions['icon'] === 'actions-context-menu'/*FuncIcons::ACTIONS_CONTEXT_MENU*/ ? '' : '<span class="caret"></span>').'</a>'.'<ul class="dropdown-menu dropdown-menu-right '.FuncIcons::ICON_LEFT_SYMBOLIC.'">'.$html.'</ul>'; |
|
| 168 | 168 | } |
| 169 | 169 | } |
| 170 | 170 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | foreach ($methods as $index => $method) { |
| 214 | 214 | try { |
| 215 | - $methodName = $recordClassname . $method['method']; |
|
| 215 | + $methodName = $recordClassname.$method['method']; |
|
| 216 | 216 | if ($Ui->$methodName()) { |
| 217 | 217 | $types[$index] = array( |
| 218 | 218 | 'classname' => $methodName, |
@@ -297,11 +297,11 @@ discard block |
||
| 297 | 297 | |
| 298 | 298 | if (isset($id)) { |
| 299 | 299 | $record = $recordSet->request($id); |
| 300 | - if (! $record->isUpdatable()) { |
|
| 300 | + if (!$record->isUpdatable()) { |
|
| 301 | 301 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 302 | 302 | } |
| 303 | 303 | } else { |
| 304 | - if (! $recordSet->isCreatable()) { |
|
| 304 | + if (!$recordSet->isCreatable()) { |
|
| 305 | 305 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 306 | 306 | } |
| 307 | 307 | $record = $recordSet->newRecord(); |
@@ -329,12 +329,12 @@ discard block |
||
| 329 | 329 | $W = bab_Widgets(); |
| 330 | 330 | |
| 331 | 331 | $recordClassname = $this->getRecordClassName(); |
| 332 | - $editorClassname = $recordClassname . 'SectionEditor'; |
|
| 332 | + $editorClassname = $recordClassname.'SectionEditor'; |
|
| 333 | 333 | |
| 334 | 334 | /* @var $editor AppRecordEditor */ |
| 335 | 335 | $editor = $Ui->$editorClassname($record); |
| 336 | - if (! isset($itemId)) { |
|
| 337 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 336 | + if (!isset($itemId)) { |
|
| 337 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 338 | 338 | } |
| 339 | 339 | $editor->setId($itemId); |
| 340 | 340 | $editor->setController($this); |
@@ -366,8 +366,8 @@ discard block |
||
| 366 | 366 | */ |
| 367 | 367 | public function getModelViewDefaultId($itemId = null) |
| 368 | 368 | { |
| 369 | - if (! isset($itemId)) { |
|
| 370 | - $itemId = $this->getClass() . '_modelView'; |
|
| 369 | + if (!isset($itemId)) { |
|
| 370 | + $itemId = $this->getClass().'_modelView'; |
|
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | return $itemId; |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | |
| 396 | 396 | $itemId = $this->getModelViewDefaultId($itemId); |
| 397 | 397 | |
| 398 | - if (! isset($type)) { |
|
| 398 | + if (!isset($type)) { |
|
| 399 | 399 | $type = $this->getFilteredViewType($itemId); |
| 400 | 400 | } |
| 401 | 401 | |
@@ -403,24 +403,24 @@ discard block |
||
| 403 | 403 | |
| 404 | 404 | switch ($type) { |
| 405 | 405 | case 'cards': |
| 406 | - $tableviewClassname = $recordClassname . 'CardsView'; |
|
| 406 | + $tableviewClassname = $recordClassname.'CardsView'; |
|
| 407 | 407 | break; |
| 408 | 408 | |
| 409 | 409 | case 'map': |
| 410 | - $tableviewClassname = $recordClassname . 'MapView'; |
|
| 410 | + $tableviewClassname = $recordClassname.'MapView'; |
|
| 411 | 411 | break; |
| 412 | 412 | |
| 413 | 413 | case 'calendar': |
| 414 | - $tableviewClassname = $recordClassname . 'CalendarView'; |
|
| 414 | + $tableviewClassname = $recordClassname.'CalendarView'; |
|
| 415 | 415 | break; |
| 416 | 416 | |
| 417 | 417 | case 'statistics': |
| 418 | - $tableviewClassname = $recordClassname . 'StatisticsView'; |
|
| 418 | + $tableviewClassname = $recordClassname.'StatisticsView'; |
|
| 419 | 419 | break; |
| 420 | 420 | |
| 421 | 421 | case 'table': |
| 422 | 422 | default: |
| 423 | - $tableviewClassname = $recordClassname . 'TableView'; |
|
| 423 | + $tableviewClassname = $recordClassname.'TableView'; |
|
| 424 | 424 | break; |
| 425 | 425 | } |
| 426 | 426 | /* @var $tableview WidgetTableModelView */ |
@@ -476,11 +476,11 @@ discard block |
||
| 476 | 476 | $App = $this->App(); |
| 477 | 477 | $Ui = $App->Ui(); |
| 478 | 478 | $recordClassname = $this->getRecordClassName(); |
| 479 | - $editorClassname = $recordClassname . 'Editor'; |
|
| 479 | + $editorClassname = $recordClassname.'Editor'; |
|
| 480 | 480 | $editor = $Ui->$editorClassname(); |
| 481 | 481 | |
| 482 | - if (! isset($itemId)) { |
|
| 483 | - $itemId = $this->getClass() . '_' . __FUNCTION__; |
|
| 482 | + if (!isset($itemId)) { |
|
| 483 | + $itemId = $this->getClass().'_'.__FUNCTION__; |
|
| 484 | 484 | } |
| 485 | 485 | $editor->setId($itemId); |
| 486 | 486 | $editor->setHiddenValue('tg', $App->controllerTg); |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | |
| 531 | 531 | foreach ($viewTypes as $viewTypeId => $viewType) { |
| 532 | 532 | $viewsBox->addItem($W->Link('', $proxy->setFilteredViewType($tableView->getId(), $viewTypeId)) |
| 533 | - ->addClass('icon', $viewType['icon'] . ($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 533 | + ->addClass('icon', $viewType['icon'].($filteredViewType === $viewTypeId ? ' active' : '')) |
|
| 534 | 534 | -> |
| 535 | 535 | // ->setSizePolicy('btn btn-xs btn-default ' . ($filteredViewType === $viewTypeId ? 'active' : '')) |
| 536 | 536 | setTitle($viewType['label']) |
@@ -563,8 +563,8 @@ discard block |
||
| 563 | 563 | $W = bab_Widgets(); |
| 564 | 564 | |
| 565 | 565 | $filterVisibility = $this->getFilterVisibility($itemId); |
| 566 | - $filterVisibility = ! $filterVisibility; |
|
| 567 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 566 | + $filterVisibility = !$filterVisibility; |
|
| 567 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 568 | 568 | |
| 569 | 569 | return true; |
| 570 | 570 | } |
@@ -576,10 +576,10 @@ discard block |
||
| 576 | 576 | protected function getFilterVisibility($itemId) |
| 577 | 577 | { |
| 578 | 578 | $W = bab_Widgets(); |
| 579 | - $filterVisibility = $W->getUserConfiguration($itemId . '/filterVisibility'); |
|
| 580 | - if (! isset($filterVisibility)) { |
|
| 579 | + $filterVisibility = $W->getUserConfiguration($itemId.'/filterVisibility'); |
|
| 580 | + if (!isset($filterVisibility)) { |
|
| 581 | 581 | $filterVisibility = false; |
| 582 | - $W->setUserConfiguration($itemId . '/filterVisibility', $filterVisibility); |
|
| 582 | + $W->setUserConfiguration($itemId.'/filterVisibility', $filterVisibility); |
|
| 583 | 583 | } |
| 584 | 584 | return $filterVisibility; |
| 585 | 585 | } |
@@ -594,8 +594,8 @@ discard block |
||
| 594 | 594 | protected function getFilteredViewType($itemId) |
| 595 | 595 | { |
| 596 | 596 | $W = bab_Widgets(); |
| 597 | - $type = $W->getUserConfiguration($itemId . '/viewType'); |
|
| 598 | - if (! isset($type)) { |
|
| 597 | + $type = $W->getUserConfiguration($itemId.'/viewType'); |
|
| 598 | + if (!isset($type)) { |
|
| 599 | 599 | $type = 'table'; |
| 600 | 600 | } |
| 601 | 601 | return $type; |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | public function setFilteredViewType($itemId, $type = null) |
| 614 | 614 | { |
| 615 | 615 | $W = bab_Widgets(); |
| 616 | - $W->setUserConfiguration($itemId . '/viewType', $type); |
|
| 616 | + $W->setUserConfiguration($itemId.'/viewType', $type); |
|
| 617 | 617 | |
| 618 | 618 | return true; |
| 619 | 619 | } |
@@ -704,13 +704,13 @@ discard block |
||
| 704 | 704 | $sessionOnly = isset($data['inSession']) ? $data['inSession'] : false; |
| 705 | 705 | |
| 706 | 706 | if (isset($data['pageLength'])) { |
| 707 | - $W->setUserConfiguration($tableModelViewId . '/pageLength', $data['pageLength'], 'widgets', $sessionOnly); |
|
| 707 | + $W->setUserConfiguration($tableModelViewId.'/pageLength', $data['pageLength'], 'widgets', $sessionOnly); |
|
| 708 | 708 | } |
| 709 | 709 | if (isset($data['displaySubTotalRow'])) { |
| 710 | - $W->setUserConfiguration($tableModelViewId . '/displaySubTotalRow', $data['displaySubTotalRow'], 'widgets', $sessionOnly); |
|
| 710 | + $W->setUserConfiguration($tableModelViewId.'/displaySubTotalRow', $data['displaySubTotalRow'], 'widgets', $sessionOnly); |
|
| 711 | 711 | } |
| 712 | 712 | if (isset($data['columns'])) { |
| 713 | - $W->setUserConfiguration($tableModelViewId . '/columns', $data['columns'], 'widgets', $sessionOnly); |
|
| 713 | + $W->setUserConfiguration($tableModelViewId.'/columns', $data['columns'], 'widgets', $sessionOnly); |
|
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | $this->addReloadSelector("#{$tableModelViewId}"); |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | $tableModelViewId = $data['tableModelViewId']; |
| 729 | 729 | $sessionOnly = isset($data['inSession']) ? $data['inSession'] : false; |
| 730 | 730 | |
| 731 | - $W->deleteUserConfiguration($data['tableModelViewId'] . '/columns', 'widgets', $sessionOnly); |
|
| 731 | + $W->deleteUserConfiguration($data['tableModelViewId'].'/columns', 'widgets', $sessionOnly); |
|
| 732 | 732 | |
| 733 | 733 | $this->addReloadSelector("#{$tableModelViewId}"); |
| 734 | 734 | return true; |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | $columns = $tableview->getVisibleColumns(); |
| 832 | 832 | $column = isset($columns[$col]) ? $columns[$col] : null; |
| 833 | 833 | |
| 834 | - if (! isset($column)) { |
|
| 834 | + if (!isset($column)) { |
|
| 835 | 835 | return true; |
| 836 | 836 | } |
| 837 | 837 | |
@@ -848,7 +848,7 @@ discard block |
||
| 848 | 848 | $labelledWidget->getLabelWidget()->addClass($label->getClasses()); |
| 849 | 849 | $labelledWidget->getInputWidget()->addClass($widget->getClasses()); |
| 850 | 850 | |
| 851 | - $filter = $W->getUserConfiguration($key . '/filter', 'widgets', false); |
|
| 851 | + $filter = $W->getUserConfiguration($key.'/filter', 'widgets', false); |
|
| 852 | 852 | if (isset($filter[$col])) { |
| 853 | 853 | $widget->setValue($filter[$col]); |
| 854 | 854 | } |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | |
| 869 | 869 | $key = $data['key']; |
| 870 | 870 | |
| 871 | - $filter = $W->getUserConfiguration($key . '/filter', 'widgets', false); |
|
| 871 | + $filter = $W->getUserConfiguration($key.'/filter', 'widgets', false); |
|
| 872 | 872 | if (isset($data['moreCriteria']) && $data['moreCriteria']) { |
| 873 | 873 | $filter = array(); |
| 874 | 874 | } |
@@ -880,7 +880,7 @@ discard block |
||
| 880 | 880 | $filter[$filterName] = $filterValue; |
| 881 | 881 | } |
| 882 | 882 | } |
| 883 | - $W->setUserConfiguration($key . '/filter', $filter, 'widgets', false); |
|
| 883 | + $W->setUserConfiguration($key.'/filter', $filter, 'widgets', false); |
|
| 884 | 884 | |
| 885 | 885 | |
| 886 | 886 | if (session_status() == PHP_SESSION_NONE) { |
@@ -890,7 +890,7 @@ discard block |
||
| 890 | 890 | unset($_SESSION['modelViewMoreCriterias'][$key]); |
| 891 | 891 | session_write_close(); |
| 892 | 892 | |
| 893 | - $this->addReloadSelector('.depends-' . $key . ':not(.widget-tableview-clone)'); |
|
| 893 | + $this->addReloadSelector('.depends-'.$key.':not(.widget-tableview-clone)'); |
|
| 894 | 894 | |
| 895 | 895 | return true; |
| 896 | 896 | } |
@@ -904,7 +904,7 @@ discard block |
||
| 904 | 904 | $Ui = $App->Ui(); |
| 905 | 905 | |
| 906 | 906 | $page = $Ui->Page(); |
| 907 | - $page->addClass('depends-modelViewMoreCriterias-' . $key); |
|
| 907 | + $page->addClass('depends-modelViewMoreCriterias-'.$key); |
|
| 908 | 908 | |
| 909 | 909 | $page->setTitle($App->translate('Search')); |
| 910 | 910 | |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | $editor = $Ui->BasicEditor($itemId, $W->VBoxLayout()); |
| 928 | 928 | $editor->setReloadAction($this->proxy() |
| 929 | 929 | ->getDisplayListMoreCriteriaEditor($key, $editor->getId())); |
| 930 | - $editor->addClass('depends-modelViewMoreCriterias-' . $key); |
|
| 930 | + $editor->addClass('depends-modelViewMoreCriterias-'.$key); |
|
| 931 | 931 | $editor->addClass('widget-no-close'); |
| 932 | 932 | $editor->setIconFormat(); |
| 933 | 933 | $editor->isAjax = true; |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | $columns = $tableview->getVisibleColumns(); |
| 943 | 943 | $filter = $tableview->getFilterValues(); |
| 944 | 944 | |
| 945 | - if (! isset($itemId)) { |
|
| 945 | + if (!isset($itemId)) { |
|
| 946 | 946 | $editor->setSaveAction($this->proxy() |
| 947 | 947 | ->saveDisplayListFilter(), $App->translate('Search')); |
| 948 | 948 | $editor->setCancelAction($this->proxy() |
@@ -953,13 +953,13 @@ discard block |
||
| 953 | 953 | if (empty($value)) { |
| 954 | 954 | continue; |
| 955 | 955 | } |
| 956 | - if (! isset($columns[$fieldName])) { |
|
| 956 | + if (!isset($columns[$fieldName])) { |
|
| 957 | 957 | continue; |
| 958 | 958 | } |
| 959 | 959 | |
| 960 | 960 | $column = $columns[$fieldName]; |
| 961 | 961 | |
| 962 | - if (! $column->isSearchable()) { |
|
| 962 | + if (!$column->isSearchable()) { |
|
| 963 | 963 | continue; |
| 964 | 964 | } |
| 965 | 965 | |
@@ -980,12 +980,12 @@ discard block |
||
| 980 | 980 | $nbAlreadyAdded = 0; |
| 981 | 981 | |
| 982 | 982 | foreach ($fields as $fieldName => $fieldValue) { |
| 983 | - if (! isset($columns[$fieldName])) { |
|
| 983 | + if (!isset($columns[$fieldName])) { |
|
| 984 | 984 | continue; |
| 985 | 985 | } |
| 986 | 986 | $column = $columns[$fieldName]; |
| 987 | 987 | |
| 988 | - if (! $column->isSearchable()) { |
|
| 988 | + if (!$column->isSearchable()) { |
|
| 989 | 989 | continue; |
| 990 | 990 | } |
| 991 | 991 | |
@@ -996,7 +996,7 @@ discard block |
||
| 996 | 996 | $alreadyFilteredBox = null; |
| 997 | 997 | } |
| 998 | 998 | |
| 999 | - if (! isset($alreadyFilteredBox)) { |
|
| 999 | + if (!isset($alreadyFilteredBox)) { |
|
| 1000 | 1000 | $editor->addItem($alreadyFilteredBox = $W->FlexItems() |
| 1001 | 1001 | ->setSizePolicy('customsection-field-box customsection-fieldsgroup-box')); |
| 1002 | 1002 | } |
@@ -1029,7 +1029,7 @@ discard block |
||
| 1029 | 1029 | ); |
| 1030 | 1030 | |
| 1031 | 1031 | foreach ($columns as $fieldName => $column) { |
| 1032 | - if (! $column->isSearchable()) { |
|
| 1032 | + if (!$column->isSearchable()) { |
|
| 1033 | 1033 | continue; |
| 1034 | 1034 | } |
| 1035 | 1035 | |
@@ -1069,12 +1069,12 @@ discard block |
||
| 1069 | 1069 | session_start(); |
| 1070 | 1070 | } |
| 1071 | 1071 | $fields = isset($data['filter']) ? $data['filter'] : array(); |
| 1072 | - if (isset($data['newField']) && ! empty($data['newField'])) { |
|
| 1072 | + if (isset($data['newField']) && !empty($data['newField'])) { |
|
| 1073 | 1073 | $newField = $data['newField']; |
| 1074 | 1074 | unset($data['key']); |
| 1075 | 1075 | unset($data['moreCriteria']); |
| 1076 | 1076 | $fields[$newField] = ''; |
| 1077 | - $this->addReloadSelector('.depends-modelViewMoreCriterias-' . $key); |
|
| 1077 | + $this->addReloadSelector('.depends-modelViewMoreCriterias-'.$key); |
|
| 1078 | 1078 | } |
| 1079 | 1079 | $_SESSION['modelViewMoreCriterias'][$key] = $fields; |
| 1080 | 1080 | return true; |
@@ -1093,7 +1093,7 @@ discard block |
||
| 1093 | 1093 | } |
| 1094 | 1094 | $_SESSION['modelViewMoreCriterias'][$key] = $fields; |
| 1095 | 1095 | } |
| 1096 | - $this->addReloadSelector('.depends-modelViewMoreCriterias-' . $key); |
|
| 1096 | + $this->addReloadSelector('.depends-modelViewMoreCriterias-'.$key); |
|
| 1097 | 1097 | return true; |
| 1098 | 1098 | } |
| 1099 | 1099 | |
@@ -1150,17 +1150,17 @@ discard block |
||
| 1150 | 1150 | |
| 1151 | 1151 | switch ($format) { |
| 1152 | 1152 | case 'xlsx': |
| 1153 | - $tableview->downloadXlsx($filename . '.xlsx'); |
|
| 1153 | + $tableview->downloadXlsx($filename.'.xlsx'); |
|
| 1154 | 1154 | break; |
| 1155 | 1155 | case 'xls': |
| 1156 | - $tableview->downloadExcel($filename . '.xls'); |
|
| 1156 | + $tableview->downloadExcel($filename.'.xls'); |
|
| 1157 | 1157 | break; |
| 1158 | 1158 | case 'ssv': |
| 1159 | - $tableview->downloadCsv($filename . '.csv', ';', $inline, 'Windows-1252'); |
|
| 1159 | + $tableview->downloadCsv($filename.'.csv', ';', $inline, 'Windows-1252'); |
|
| 1160 | 1160 | break; |
| 1161 | 1161 | case 'csv': |
| 1162 | 1162 | default: |
| 1163 | - $tableview->downloadCsv($filename . '.csv', ',', $inline, BabCharset::getIso()); |
|
| 1163 | + $tableview->downloadCsv($filename.'.csv', ',', $inline, BabCharset::getIso()); |
|
| 1164 | 1164 | break; |
| 1165 | 1165 | } |
| 1166 | 1166 | } |
@@ -1226,7 +1226,7 @@ discard block |
||
| 1226 | 1226 | $recordSet = $this->getRecordSet(); |
| 1227 | 1227 | |
| 1228 | 1228 | $record = $recordSet->request($id); |
| 1229 | - if (! $record->isReadable()) { |
|
| 1229 | + if (!$record->isReadable()) { |
|
| 1230 | 1230 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 1231 | 1231 | } |
| 1232 | 1232 | |
@@ -1234,7 +1234,7 @@ discard block |
||
| 1234 | 1234 | |
| 1235 | 1235 | $recordClassname = $this->getRecordClassName(); |
| 1236 | 1236 | |
| 1237 | - $viewClassname = $recordClassname . 'FullFrame'; |
|
| 1237 | + $viewClassname = $recordClassname.'FullFrame'; |
|
| 1238 | 1238 | |
| 1239 | 1239 | $fullFrame = $Ui->$viewClassname($record); |
| 1240 | 1240 | $fullFrame->setView($view); |
@@ -1249,7 +1249,7 @@ discard block |
||
| 1249 | 1249 | if (isset($itemId)) { |
| 1250 | 1250 | $page->setId($itemId); |
| 1251 | 1251 | } |
| 1252 | - $page->addClass('depends-' . $this->getRecordClassName()); |
|
| 1252 | + $page->addClass('depends-'.$this->getRecordClassName()); |
|
| 1253 | 1253 | |
| 1254 | 1254 | $page->addToolbar($mainMenu); |
| 1255 | 1255 | |
@@ -1289,11 +1289,11 @@ discard block |
||
| 1289 | 1289 | |
| 1290 | 1290 | if (isset($id)) { |
| 1291 | 1291 | $record = $recordSet->request($id); |
| 1292 | - if (! $record->isUpdatable()) { |
|
| 1292 | + if (!$record->isUpdatable()) { |
|
| 1293 | 1293 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 1294 | 1294 | } |
| 1295 | 1295 | } else { |
| 1296 | - if (! $recordSet->isCreatable()) { |
|
| 1296 | + if (!$recordSet->isCreatable()) { |
|
| 1297 | 1297 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 1298 | 1298 | } |
| 1299 | 1299 | $record = $recordSet->newRecord(); |
@@ -1329,12 +1329,12 @@ discard block |
||
| 1329 | 1329 | |
| 1330 | 1330 | if (isset($id)) { |
| 1331 | 1331 | $record = $recordSet->request($id); |
| 1332 | - if (! $record->isUpdatable()) { |
|
| 1332 | + if (!$record->isUpdatable()) { |
|
| 1333 | 1333 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 1334 | 1334 | } |
| 1335 | 1335 | $editor->setRecord($record); |
| 1336 | 1336 | } else { |
| 1337 | - if (! $recordSet->isCreatable()) { |
|
| 1337 | + if (!$recordSet->isCreatable()) { |
|
| 1338 | 1338 | throw new AppAccessException($App->translate('You do not have access to this page')); |
| 1339 | 1339 | } |
| 1340 | 1340 | $record = $recordSet->newRecord(); |
@@ -1382,7 +1382,7 @@ discard block |
||
| 1382 | 1382 | |
| 1383 | 1383 | $recordTitle = $record->getRecordTitle(); |
| 1384 | 1384 | |
| 1385 | - $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'); |
|
| 1385 | + $message = sprintf($App->translate('%s has been deleted'), $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'); |
|
| 1386 | 1386 | return $message; |
| 1387 | 1387 | } |
| 1388 | 1388 | |
@@ -1413,14 +1413,14 @@ discard block |
||
| 1413 | 1413 | * |
| 1414 | 1414 | * @param AppRecord $record |
| 1415 | 1415 | */ |
| 1416 | - protected function preSave(ORMRecord &$record, $data) {} |
|
| 1416 | + protected function preSave(ORMRecord & $record, $data) {} |
|
| 1417 | 1417 | |
| 1418 | 1418 | /** |
| 1419 | 1419 | * Method for post save actions on record |
| 1420 | 1420 | * |
| 1421 | 1421 | * @param AppRecord $record |
| 1422 | 1422 | */ |
| 1423 | - protected function postSave(ORMRecord &$record, $data) {} |
|
| 1423 | + protected function postSave(ORMRecord & $record, $data) {} |
|
| 1424 | 1424 | |
| 1425 | 1425 | /** |
| 1426 | 1426 | * @return bool|WidgetAction |
@@ -1456,12 +1456,12 @@ discard block |
||
| 1456 | 1456 | $pk = $recordSet->getPrimaryKey(); |
| 1457 | 1457 | $message = null; |
| 1458 | 1458 | |
| 1459 | - if (! empty($data[$pk])) { |
|
| 1459 | + if (!empty($data[$pk])) { |
|
| 1460 | 1460 | $record = $recordSet->request($data[$pk]); |
| 1461 | 1461 | $record->deleted = AppTraceableRecord::DELETED_STATUS_EXISTING; |
| 1462 | 1462 | unset($data[$pk]); |
| 1463 | 1463 | |
| 1464 | - if (! $record->isUpdatable()) { |
|
| 1464 | + if (!$record->isUpdatable()) { |
|
| 1465 | 1465 | throw new AppAccessException('Access denied'); |
| 1466 | 1466 | } |
| 1467 | 1467 | |
@@ -1470,18 +1470,18 @@ discard block |
||
| 1470 | 1470 | |
| 1471 | 1471 | $record = $recordSet->newRecord(); |
| 1472 | 1472 | |
| 1473 | - if (! $recordSet->isCreatable()) { |
|
| 1473 | + if (!$recordSet->isCreatable()) { |
|
| 1474 | 1474 | throw new AppAccessException('Access denied'); |
| 1475 | 1475 | } |
| 1476 | 1476 | |
| 1477 | 1477 | $message = $this->getCreatedMessage(); |
| 1478 | 1478 | } |
| 1479 | 1479 | |
| 1480 | - if (! isset($record)) { |
|
| 1480 | + if (!isset($record)) { |
|
| 1481 | 1481 | throw new AppSaveException($App->translate('The record does not exists')); |
| 1482 | 1482 | } |
| 1483 | 1483 | |
| 1484 | - if (! isset($data)) { |
|
| 1484 | + if (!isset($data)) { |
|
| 1485 | 1485 | throw new AppSaveException($App->translate('Nothing to save')); |
| 1486 | 1486 | } |
| 1487 | 1487 | |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | $this->addToast($message); |
| 1495 | 1495 | } |
| 1496 | 1496 | |
| 1497 | - $this->addReloadSelector('.depends-' . $this->getRecordClassName()); |
|
| 1497 | + $this->addReloadSelector('.depends-'.$this->getRecordClassName()); |
|
| 1498 | 1498 | return true; |
| 1499 | 1499 | } |
| 1500 | 1500 | |
@@ -1517,7 +1517,7 @@ discard block |
||
| 1517 | 1517 | |
| 1518 | 1518 | $record = $recordSet->request($id); |
| 1519 | 1519 | |
| 1520 | - if (! $record->isDeletable()) { |
|
| 1520 | + if (!$record->isDeletable()) { |
|
| 1521 | 1521 | throw new AppAccessException('Sorry, You are not allowed to perform this operation'); |
| 1522 | 1522 | } |
| 1523 | 1523 | $deletedMessage = $this->getDeletedMessage($record); |
@@ -1526,7 +1526,7 @@ discard block |
||
| 1526 | 1526 | $this->addToast($deletedMessage); |
| 1527 | 1527 | } |
| 1528 | 1528 | |
| 1529 | - $this->addReloadSelector('.depends-' . $record->getClassName()); |
|
| 1529 | + $this->addReloadSelector('.depends-'.$record->getClassName()); |
|
| 1530 | 1530 | |
| 1531 | 1531 | return true; |
| 1532 | 1532 | } |
@@ -1551,7 +1551,7 @@ discard block |
||
| 1551 | 1551 | $page->addClass('app-page-editor'); |
| 1552 | 1552 | $page->setTitle($App->translate('Deletion')); |
| 1553 | 1553 | |
| 1554 | - if (! isset($record)) { |
|
| 1554 | + if (!isset($record)) { |
|
| 1555 | 1555 | $page->addItem($W->Label($App->translate('This element does not exists.'))); |
| 1556 | 1556 | $page->addClass('alert', 'alert-warning'); |
| 1557 | 1557 | return $page; |
@@ -1564,7 +1564,7 @@ discard block |
||
| 1564 | 1564 | |
| 1565 | 1565 | $recordTitle = $record->getRecordTitle(); |
| 1566 | 1566 | |
| 1567 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1567 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1568 | 1568 | $form->addItem($W->Title($subTitle, 5)); |
| 1569 | 1569 | |
| 1570 | 1570 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |
@@ -1603,7 +1603,7 @@ discard block |
||
| 1603 | 1603 | |
| 1604 | 1604 | $record = $recordSet->request($id); |
| 1605 | 1605 | |
| 1606 | - if (! $record->isRemovable()) { |
|
| 1606 | + if (!$record->isRemovable()) { |
|
| 1607 | 1607 | throw new AppAccessException('Sorry, You are not allowed to perform this operation'); |
| 1608 | 1608 | } |
| 1609 | 1609 | |
@@ -1616,7 +1616,7 @@ discard block |
||
| 1616 | 1616 | } |
| 1617 | 1617 | } |
| 1618 | 1618 | |
| 1619 | - $this->addReloadSelector('.depends-' . $record->getClassName()); |
|
| 1619 | + $this->addReloadSelector('.depends-'.$record->getClassName()); |
|
| 1620 | 1620 | |
| 1621 | 1621 | return true; |
| 1622 | 1622 | } |
@@ -1645,7 +1645,7 @@ discard block |
||
| 1645 | 1645 | |
| 1646 | 1646 | $recordTitle = $record->getRecordTitle(); |
| 1647 | 1647 | |
| 1648 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1648 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1649 | 1649 | $form->addItem($W->Title($subTitle, 5)); |
| 1650 | 1650 | |
| 1651 | 1651 | $form->addItem($W->Title($App->translate('Confirm delete?'), 6)); |
@@ -1687,10 +1687,10 @@ discard block |
||
| 1687 | 1687 | $record = null; |
| 1688 | 1688 | foreach ($records as $record) { |
| 1689 | 1689 | } |
| 1690 | - if (! isset($record)) { |
|
| 1690 | + if (!isset($record)) { |
|
| 1691 | 1691 | throw new AppAccessException('Sorry, You are not allowed to perform this operation'); |
| 1692 | 1692 | } |
| 1693 | - if (! $record->isRestorable()) { |
|
| 1693 | + if (!$record->isRestorable()) { |
|
| 1694 | 1694 | throw new AppAccessException('Sorry, You are not allowed to perform this operation'); |
| 1695 | 1695 | } |
| 1696 | 1696 | |
@@ -1701,7 +1701,7 @@ discard block |
||
| 1701 | 1701 | $record->save(); |
| 1702 | 1702 | $this->addToast($deletedMessage); |
| 1703 | 1703 | |
| 1704 | - $this->addReloadSelector('.depends-' . $record->getClassName()); |
|
| 1704 | + $this->addReloadSelector('.depends-'.$record->getClassName()); |
|
| 1705 | 1705 | |
| 1706 | 1706 | return true; |
| 1707 | 1707 | } |
@@ -1724,7 +1724,7 @@ discard block |
||
| 1724 | 1724 | $record = null; |
| 1725 | 1725 | foreach ($records as $record) { |
| 1726 | 1726 | } |
| 1727 | - if (! isset($record)) { |
|
| 1727 | + if (!isset($record)) { |
|
| 1728 | 1728 | throw new AppAccessException('Sorry, You are not allowed to perform this operation'); |
| 1729 | 1729 | } |
| 1730 | 1730 | |
@@ -1737,7 +1737,7 @@ discard block |
||
| 1737 | 1737 | |
| 1738 | 1738 | $recordTitle = $record->getRecordTitle(); |
| 1739 | 1739 | |
| 1740 | - $subTitle = $App->translate($recordSet->getDescription()) . ' "' . $recordTitle . '"'; |
|
| 1740 | + $subTitle = $App->translate($recordSet->getDescription()).' "'.$recordTitle.'"'; |
|
| 1741 | 1741 | $form->addItem($W->Title($subTitle, 5)); |
| 1742 | 1742 | |
| 1743 | 1743 | $confirmedAction = $this->proxy()->restore($id); |
@@ -1850,14 +1850,14 @@ discard block |
||
| 1850 | 1850 | $registry = bab_getRegistryInstance(); |
| 1851 | 1851 | |
| 1852 | 1852 | $userId = '0'; |
| 1853 | - $registry->changeDirectory('/widgets/user/' . $userId . '/' . $id . '/filters'); |
|
| 1853 | + $registry->changeDirectory('/widgets/user/'.$userId.'/'.$id.'/filters'); |
|
| 1854 | 1854 | |
| 1855 | 1855 | while ($filterName = $registry->fetchChildKey()) { |
| 1856 | 1856 | $filters[] = $filterName; |
| 1857 | 1857 | } |
| 1858 | 1858 | |
| 1859 | 1859 | $userId = bab_getUserId(); |
| 1860 | - $registry->changeDirectory('/widgets/user/' . $userId . '/' . $id . '/filters'); |
|
| 1860 | + $registry->changeDirectory('/widgets/user/'.$userId.'/'.$id.'/filters'); |
|
| 1861 | 1861 | |
| 1862 | 1862 | while ($filterName = $registry->fetchChildKey()) { |
| 1863 | 1863 | $filters[] = $filterName; |
@@ -1876,15 +1876,15 @@ discard block |
||
| 1876 | 1876 | { |
| 1877 | 1877 | $W = bab_Widgets(); |
| 1878 | 1878 | $tableview = $this->modelView(null, 'table'); |
| 1879 | - $W->setUserConfiguration($tableview->getId() . '/currentFilterName', $filterName, 'widgets', false); |
|
| 1879 | + $W->setUserConfiguration($tableview->getId().'/currentFilterName', $filterName, 'widgets', false); |
|
| 1880 | 1880 | |
| 1881 | 1881 | $registry = bab_getRegistryInstance(); |
| 1882 | 1882 | $userId = '0'; |
| 1883 | - $registry->changeDirectory('/widgets/user/' . $userId . '/' . $tableview->getId() . '/filters'); |
|
| 1883 | + $registry->changeDirectory('/widgets/user/'.$userId.'/'.$tableview->getId().'/filters'); |
|
| 1884 | 1884 | $filterValues = $registry->getValue($filterName); |
| 1885 | 1885 | |
| 1886 | - if (! $filterValues) { |
|
| 1887 | - $filterValues = $W->getUserConfiguration($tableview->getId() . '/filters/' . $filterName, 'widgets', false); |
|
| 1886 | + if (!$filterValues) { |
|
| 1887 | + $filterValues = $W->getUserConfiguration($tableview->getId().'/filters/'.$filterName, 'widgets', false); |
|
| 1888 | 1888 | } |
| 1889 | 1889 | |
| 1890 | 1890 | $tableview = $this->modelView($filterValues, 'table'); |
@@ -1900,7 +1900,7 @@ discard block |
||
| 1900 | 1900 | { |
| 1901 | 1901 | $W = bab_Widgets(); |
| 1902 | 1902 | $id = $this->getModelViewDefaultId(); |
| 1903 | - $filter = $W->getUserConfiguration($id . '/currentFilterName', 'widgets', false); |
|
| 1903 | + $filter = $W->getUserConfiguration($id.'/currentFilterName', 'widgets', false); |
|
| 1904 | 1904 | |
| 1905 | 1905 | return $filter; |
| 1906 | 1906 | } |
@@ -1913,7 +1913,7 @@ discard block |
||
| 1913 | 1913 | if (isset($name)) { |
| 1914 | 1914 | $W = bab_Widgets(); |
| 1915 | 1915 | // @TODO : fix missing parameters |
| 1916 | - $filter = $W->getUserConfiguration($this->getModelViewDefaultId() . '/filters/' . $name, 'widgets', false); |
|
| 1916 | + $filter = $W->getUserConfiguration($this->getModelViewDefaultId().'/filters/'.$name, 'widgets', false); |
|
| 1917 | 1917 | $filterValues = $filter['values']; |
| 1918 | 1918 | } else { |
| 1919 | 1919 | $filterValues = null; |
@@ -1950,7 +1950,7 @@ discard block |
||
| 1950 | 1950 | 'values' => $filterValues |
| 1951 | 1951 | ); |
| 1952 | 1952 | |
| 1953 | - $W->setUserConfiguration($tableview->getId() . '/filters/' . $name, $data, 'widgets', false); |
|
| 1953 | + $W->setUserConfiguration($tableview->getId().'/filters/'.$name, $data, 'widgets', false); |
|
| 1954 | 1954 | |
| 1955 | 1955 | return true; |
| 1956 | 1956 | } |
@@ -1967,7 +1967,7 @@ discard block |
||
| 1967 | 1967 | $Ui = $App->Ui(); |
| 1968 | 1968 | |
| 1969 | 1969 | $currentFilterName = $this->getCurrentFilterName(); |
| 1970 | - $filter = $W->getUserConfiguration($this->getModelViewDefaultId() . '/filters/' . $currentFilterName, 'widgets', false); |
|
| 1970 | + $filter = $W->getUserConfiguration($this->getModelViewDefaultId().'/filters/'.$currentFilterName, 'widgets', false); |
|
| 1971 | 1971 | |
| 1972 | 1972 | $page = $Ui->Page(); |
| 1973 | 1973 | |
@@ -2010,7 +2010,7 @@ discard block |
||
| 2010 | 2010 | $App = $this->App(); |
| 2011 | 2011 | $Ui = $App->Ui(); |
| 2012 | 2012 | |
| 2013 | - $filter = $W->getUserConfiguration($this->getModelViewDefaultId() . '/filters/' . $name, 'widgets', false); |
|
| 2013 | + $filter = $W->getUserConfiguration($this->getModelViewDefaultId().'/filters/'.$name, 'widgets', false); |
|
| 2014 | 2014 | |
| 2015 | 2015 | $page = $Ui->Page(); |
| 2016 | 2016 | |
@@ -2058,7 +2058,7 @@ discard block |
||
| 2058 | 2058 | |
| 2059 | 2059 | $filterNames = $this->getFilterNames(); |
| 2060 | 2060 | foreach ($filterNames as $filterName) { |
| 2061 | - $filter = $W->getUserConfiguration($this->getModelViewDefaultId() . '/filters/' . $filterName, 'widgets', false); |
|
| 2061 | + $filter = $W->getUserConfiguration($this->getModelViewDefaultId().'/filters/'.$filterName, 'widgets', false); |
|
| 2062 | 2062 | |
| 2063 | 2063 | $filterBox = $W->HBoxItems() |
| 2064 | 2064 | ->setVerticalAlign('middle') |
@@ -2097,7 +2097,7 @@ discard block |
||
| 2097 | 2097 | $App = $this->App(); |
| 2098 | 2098 | $Ui = $App->Ui(); |
| 2099 | 2099 | |
| 2100 | - $filter = $W->getUserConfiguration($this->getModelViewDefaultId() . '/filters/' . $name, 'widgets', false); |
|
| 2100 | + $filter = $W->getUserConfiguration($this->getModelViewDefaultId().'/filters/'.$name, 'widgets', false); |
|
| 2101 | 2101 | |
| 2102 | 2102 | $page = $Ui->Page(); |
| 2103 | 2103 | |
@@ -2129,7 +2129,7 @@ discard block |
||
| 2129 | 2129 | $this->requireDeleteMethod(); |
| 2130 | 2130 | |
| 2131 | 2131 | $W = bab_Widgets(); |
| 2132 | - $W->deleteUserConfiguration($this->getModelViewDefaultId() . '/filters/' . $name, 'widgets', false); |
|
| 2132 | + $W->deleteUserConfiguration($this->getModelViewDefaultId().'/filters/'.$name, 'widgets', false); |
|
| 2133 | 2133 | |
| 2134 | 2134 | return true; |
| 2135 | 2135 | } |
@@ -2142,7 +2142,7 @@ discard block |
||
| 2142 | 2142 | $modelView = $this->modelView(); |
| 2143 | 2143 | $modelView->setHighlightedRows($ids); |
| 2144 | 2144 | |
| 2145 | - $this->addReloadSelector('.depends-' . $modelView->getId() . '-HighlightedRecords'); |
|
| 2145 | + $this->addReloadSelector('.depends-'.$modelView->getId().'-HighlightedRecords'); |
|
| 2146 | 2146 | |
| 2147 | 2147 | return true; |
| 2148 | 2148 | } |
@@ -2155,7 +2155,7 @@ discard block |
||
| 2155 | 2155 | $modelView = $this->modelView(); |
| 2156 | 2156 | $modelView->clearHighlightedRows(); |
| 2157 | 2157 | |
| 2158 | - $this->addReloadSelector('.depends-' . $modelView->getId() . '-HighlightedRecords'); |
|
| 2158 | + $this->addReloadSelector('.depends-'.$modelView->getId().'-HighlightedRecords'); |
|
| 2159 | 2159 | |
| 2160 | 2160 | return true; |
| 2161 | 2161 | } |
@@ -2172,7 +2172,7 @@ discard block |
||
| 2172 | 2172 | $inSession = false; |
| 2173 | 2173 | $modelViewId = $this->getModelViewDefaultId(); |
| 2174 | 2174 | // $inSession = true; |
| 2175 | - $highlightedRows = $W->getUserConfiguration($modelViewId . '/highlightedRows', 'widgets', $inSession); |
|
| 2175 | + $highlightedRows = $W->getUserConfiguration($modelViewId.'/highlightedRows', 'widgets', $inSession); |
|
| 2176 | 2176 | |
| 2177 | 2177 | $recordSet = $this->getRecordSet(); |
| 2178 | 2178 | // $records = $recordSet->select($recordSet->id->in($highlightedRows)); |
@@ -2192,7 +2192,7 @@ discard block |
||
| 2192 | 2192 | // else{ |
| 2193 | 2193 | $Ui = $App->Ui(); |
| 2194 | 2194 | $recordClassname = $this->getRecordClassName(); |
| 2195 | - $viewClassname = $recordClassname . 'FullFrame'; |
|
| 2195 | + $viewClassname = $recordClassname.'FullFrame'; |
|
| 2196 | 2196 | // } |
| 2197 | 2197 | |
| 2198 | 2198 | if ($records->count() > 0) { |
@@ -2200,7 +2200,7 @@ discard block |
||
| 2200 | 2200 | ->clearHighlightedRecords()) |
| 2201 | 2201 | ->setAjaxAction(null, false) |
| 2202 | 2202 | ->addClass('icon', FuncIcons::ACTIONS_ARROW_RIGHT_DOUBLE, "app_closeHighlightButton") |
| 2203 | - ->setSizePolicy(FuncIcons::ICON_LEFT_32 . ' pull-right')); |
|
| 2203 | + ->setSizePolicy(FuncIcons::ICON_LEFT_32.' pull-right')); |
|
| 2204 | 2204 | |
| 2205 | 2205 | foreach ($records as $record) { |
| 2206 | 2206 | |
@@ -2219,7 +2219,7 @@ discard block |
||
| 2219 | 2219 | $box->addClass('box', 'shadow'); |
| 2220 | 2220 | } |
| 2221 | 2221 | |
| 2222 | - $box->addClass('depends-' . $modelViewId . '-HighlightedRecords'); |
|
| 2222 | + $box->addClass('depends-'.$modelViewId.'-HighlightedRecords'); |
|
| 2223 | 2223 | $box->setReloadAction($this->proxy() |
| 2224 | 2224 | ->previewHighlightedRecords($view)); |
| 2225 | 2225 | return $box; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | foreach ($allViewSections as $viewSection) { |
| 88 | 88 | $fields = $viewSection->getFields(); |
| 89 | 89 | foreach ($fields as $field) { |
| 90 | - $allViewFieldNames[$field['fieldname']] = $viewSection->view . ',' . $viewSection->rank . ',' . $viewSection->id; |
|
| 90 | + $allViewFieldNames[$field['fieldname']] = $viewSection->view.','.$viewSection->rank.','.$viewSection->id; |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | $field = $customSection->getField($fieldName); |
| 160 | 160 | |
| 161 | - if (! isset($field)) { |
|
| 161 | + if (!isset($field)) { |
|
| 162 | 162 | return null; |
| 163 | 163 | } |
| 164 | 164 | |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $manySets = $objectRecordSet->getHasManyRelations(); |
| 383 | 383 | $oneSets = $objectRecordSet->getHasOneRelations(); |
| 384 | 384 | |
| 385 | - if (! empty($record->visibilityCriteria)) { |
|
| 385 | + if (!empty($record->visibilityCriteria)) { |
|
| 386 | 386 | $arrCriteria = json_decode($record->visibilityCriteria, true); |
| 387 | 387 | |
| 388 | 388 | $data = array(); |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | if (is_array($value)) { |
| 395 | 395 | foreach ($value as $key => $subValue) { |
| 396 | 396 | foreach ($manySets as $manyFieldName => $manyRelation) { |
| 397 | - if ($key . 'Set' == $manyRelation->getForeignSetClassName()) { |
|
| 397 | + if ($key.'Set' == $manyRelation->getForeignSetClassName()) { |
|
| 398 | 398 | foreach ($subValue as $subFieldName => $subConditions) { |
| 399 | 399 | if ($subFieldName === '_foreignField') { |
| 400 | 400 | continue; |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | } |
| 411 | 411 | } |
| 412 | 412 | foreach ($oneSets as $oneFieldName => $oneRelation) { |
| 413 | - if ($key . 'Set' == $oneRelation->getForeignSetClassName()) { |
|
| 413 | + if ($key.'Set' == $oneRelation->getForeignSetClassName()) { |
|
| 414 | 414 | foreach ($subValue as $subFieldName => $subConditions) { |
| 415 | 415 | if ($subFieldName === '_foreignField') { |
| 416 | 416 | continue; |
@@ -458,10 +458,10 @@ discard block |
||
| 458 | 458 | return true; |
| 459 | 459 | } |
| 460 | 460 | |
| 461 | - protected function preSave(ORMRecord &$record, $data) |
|
| 461 | + protected function preSave(ORMRecord & $record, $data) |
|
| 462 | 462 | { |
| 463 | 463 | parent::preSave($record, $data); |
| 464 | - if (! isset($record->id) || empty($record->id)) { |
|
| 464 | + if (!isset($record->id) || empty($record->id)) { |
|
| 465 | 465 | $set = $record->getParentSet(); |
| 466 | 466 | $nbContainers = $set->select( |
| 467 | 467 | $set->all( |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | |
| 583 | 583 | $visibilityCriteria = ''; |
| 584 | 584 | |
| 585 | - if (! empty($condition)) { |
|
| 585 | + if (!empty($condition)) { |
|
| 586 | 586 | $criteria = $field->{$condition}($data['value']); |
| 587 | 587 | $visibilityCriteria = $criteria->toJson(); |
| 588 | 588 | } |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | $menu->setSizePolicy(FuncIcons::ICON_LEFT_16); |
| 641 | 641 | |
| 642 | 642 | $hasVisibilityBox = $W->FlowItems()->addClass('widget-100'); |
| 643 | - if (! empty($customContainer->visibilityCriteria)) { |
|
| 643 | + if (!empty($customContainer->visibilityCriteria)) { |
|
| 644 | 644 | $hasVisibilityBox->addItem( |
| 645 | 645 | $W->HBoxItems( |
| 646 | 646 | $W->Label($App->translate('This container has a visibility condition')) |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | } |
| 722 | 722 | |
| 723 | 723 | header('Content-type: application/json'); |
| 724 | - header('Content-Disposition: attachment; filename="' . $object . '.' . ($view === '' ? 'default' : $view) . '.json"' . "\n"); |
|
| 724 | + header('Content-Disposition: attachment; filename="'.$object.'.'.($view === '' ? 'default' : $view).'.json"'."\n"); |
|
| 725 | 725 | if (BabCharset::getIso() != BabCharset::UTF_8) { |
| 726 | 726 | $containersValues = app_utf8Encode($containersValues); |
| 727 | 727 | } |
@@ -797,7 +797,7 @@ discard block |
||
| 797 | 797 | break; |
| 798 | 798 | } |
| 799 | 799 | |
| 800 | - if (! isset($data)) { |
|
| 800 | + if (!isset($data)) { |
|
| 801 | 801 | $this->addError($App->translate('Unable to get file content')); |
| 802 | 802 | return true; |
| 803 | 803 | } |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | foreach ($containersFields as $containerId => $containerFieldIds) { |
| 987 | 987 | foreach ($containerFieldIds as $containerFieldId) { |
| 988 | 988 | list($srcContainerId, $srcfieldId) = explode('.', $containerFieldId); |
| 989 | - if (! isset($containersRawFields[$srcContainerId][$srcfieldId])) { |
|
| 989 | + if (!isset($containersRawFields[$srcContainerId][$srcfieldId])) { |
|
| 990 | 990 | return true; |
| 991 | 991 | } |
| 992 | 992 | } |
@@ -52,7 +52,6 @@ |
||
| 52 | 52 | * @method AppCustomField request(mixed $criteria) |
| 53 | 53 | * @method AppCustomField[]|ORMMySqlIterator select(ORMCriteria $criteria) |
| 54 | 54 | * @method AppCustomField newRecord() |
| 55 | - |
|
| 56 | 55 | * @property ORMStringField $name |
| 57 | 56 | * @property ORMStringField $fieldname |
| 58 | 57 | * @property ORMTextField $description |