@@ -156,13 +156,13 @@ discard block |
||
156 | 156 | public function join($fkFieldName) |
157 | 157 | { |
158 | 158 | $fkField = $this->getField($fkFieldName); |
159 | - if (! ($fkField instanceof ORMFkField)) { |
|
159 | + if (!($fkField instanceof ORMFkField)) { |
|
160 | 160 | return $this; |
161 | 161 | } |
162 | 162 | $setName = $fkField->getForeignSetName(); |
163 | 163 | |
164 | - if (! $setName || 'Set' === $setName) { |
|
165 | - throw new \Exception('The set name is missing on foreign key field ' . $fkFieldName); |
|
164 | + if (!$setName || 'Set' === $setName) { |
|
165 | + throw new \Exception('The set name is missing on foreign key field '.$fkFieldName); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | $appSetName = $this->trimSetName($setName); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $ownerSetFieldName = $fieldName; |
200 | 200 | |
201 | 201 | if (substr($foreignSetClassName, -3, 3) !== 'Set') { |
202 | - $foreignSetClassName = $foreignSetClassName . 'Set'; |
|
202 | + $foreignSetClassName = $foreignSetClassName.'Set'; |
|
203 | 203 | } |
204 | 204 | |
205 | 205 | $oRelations = bab_getInstance('Capwelton\LibOrm\MySql\ORMRelations'); |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $ownerSetFieldName = $fieldName; |
220 | 220 | |
221 | 221 | if (substr($foreignSetClassName, -3, 3) !== 'Set') { |
222 | - $foreignSetClassName = $foreignSetClassName . 'Set'; |
|
222 | + $foreignSetClassName = $foreignSetClassName.'Set'; |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | $oRelations = bab_getInstance('Capwelton\LibOrm\MySql\ORMRelations'); |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | public function request($mixedParam = null, $sPropertyName = null) |
340 | 340 | { |
341 | 341 | $record = $this->get($mixedParam, $sPropertyName); |
342 | - if (! isset($record)) { |
|
342 | + if (!isset($record)) { |
|
343 | 343 | // This will remove the default criteria for TraceableRecords and |
344 | 344 | // fetch even 'deleted' ones. |
345 | 345 | $this->setDefaultCriteria(null); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | if (strpos($sourceClass, '\\')) { |
511 | 511 | $sourceClass = (new \ReflectionClass($sourceClass))->getShortName(); |
512 | 512 | } |
513 | - if (! isset($sourceIdsByClasses[$sourceClass])) { |
|
513 | + if (!isset($sourceIdsByClasses[$sourceClass])) { |
|
514 | 514 | $sourceIdsByClasses[$sourceClass] = array(); |
515 | 515 | } |
516 | 516 | $sourceIdsByClasses[$sourceClass][] = $source->id; |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | if (strpos($targetClass, '\\')) { |
564 | 564 | $targetClass = (new \ReflectionClass($targetClass))->getShortName(); |
565 | 565 | } |
566 | - if (! isset($targetIdsByClasses[$targetClass])) { |
|
566 | + if (!isset($targetIdsByClasses[$targetClass])) { |
|
567 | 567 | $targetIdsByClasses[$targetClass] = array(); |
568 | 568 | } |
569 | 569 | $targetIdsByClasses[$targetClass][] = $target->id; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | foreach ($this->visibleColumns as $columnPath => $column) { |
131 | 131 | |
132 | - if (! isset($this->columnsDescriptions[$columnPath])) { |
|
132 | + if (!isset($this->columnsDescriptions[$columnPath])) { |
|
133 | 133 | $this->columnsDescriptions[$columnPath] = $column->getDescription(); |
134 | 134 | } |
135 | 135 | |
@@ -156,9 +156,9 @@ discard block |
||
156 | 156 | $direction = ':up'; |
157 | 157 | } |
158 | 158 | |
159 | - $url = BabUrl::mod($this->sortBaseUrl, $this->sortParameterName, $columnPath . $direction); |
|
159 | + $url = BabUrl::mod($this->sortBaseUrl, $this->sortParameterName, $columnPath.$direction); |
|
160 | 160 | if ($anchor = $this->getAnchor()) { |
161 | - $url .= '#' . urlencode($anchor); |
|
161 | + $url .= '#'.urlencode($anchor); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | $columnItem = $W->Link($W->FlexItems($W->Label($columnLabel), $W->Items() |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | ->setAlignItems(WidgetFlexLayout::FLEX_ALIGN_CONTENT_CENTER), $url) |
167 | 167 | ->addClass('widget-table-column-sorting-action'); |
168 | 168 | if ($this->sortAjaxAction) { |
169 | - $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath . $direction), ''); |
|
169 | + $columnItem->setAjaxAction($this->sortAjaxAction->setParameter('sort', $columnPath.$direction), ''); |
|
170 | 170 | } |
171 | 171 | $columnItem = $W->FlexItems($columnItem); |
172 | 172 | } else { |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | $sizePolicy .= ' widget-table-column-sortable'; |
185 | 185 | } |
186 | 186 | if ($isSearchable) { |
187 | - if (! isset($this->filterBaseUrl)) { |
|
187 | + if (!isset($this->filterBaseUrl)) { |
|
188 | 188 | $this->filterBaseUrl = $this->getRecordControllerProxy()->displayListFilter(); |
189 | 189 | } |
190 | 190 | $url = $this->filterBaseUrl; |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | ->setDialogClass('box blue') |
197 | 197 | ->setDialogPositionRelativeToLink(true), 0); |
198 | 198 | $sizePolicy .= ' widget-table-column-searchable'; |
199 | - if (isset($filterValues[$columnPath]) && ! empty($filterValues[$columnPath])) { |
|
199 | + if (isset($filterValues[$columnPath]) && !empty($filterValues[$columnPath])) { |
|
200 | 200 | $sizePolicy .= ' widget-table-column-searched'; |
201 | 201 | } |
202 | 202 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $this->toggleCheckAllBox->setTitle(widget_translate('Select all on page')); |
216 | 216 | $this->toggleCheckAllBox->setSizePolicy('condensed'); |
217 | 217 | $this->toggleCheckAllBox->setCheckedValue(true); |
218 | - if (isset($_SESSION['toggleCheckAllBox'][$this->getId()]) && ! empty($_SESSION['toggleCheckAllBox'][$this->getId()]) && $_SESSION['toggleCheckAllBox'][$this->getId()] == 'on') { |
|
218 | + if (isset($_SESSION['toggleCheckAllBox'][$this->getId()]) && !empty($_SESSION['toggleCheckAllBox'][$this->getId()]) && $_SESSION['toggleCheckAllBox'][$this->getId()] == 'on') { |
|
219 | 219 | $this->toggleCheckAllBox->setValue(true); |
220 | 220 | } |
221 | 221 | return $W->FlexItems($this->toggleCheckAllBox); |
@@ -256,12 +256,12 @@ discard block |
||
256 | 256 | */ |
257 | 257 | public function App() |
258 | 258 | { |
259 | - if (! isset($this->app)) { |
|
259 | + if (!isset($this->app)) { |
|
260 | 260 | // If the app object was not specified (through the setApp() method) |
261 | 261 | // we try to select one according to the classname prefix. |
262 | 262 | list($prefix) = explode('_', get_class($this)); |
263 | 263 | $functionalityName = ucwords($prefix); |
264 | - $this->app = BabFunctionality::get('App/' . $functionalityName); |
|
264 | + $this->app = BabFunctionality::get('App/'.$functionalityName); |
|
265 | 265 | if (!$this->app) { |
266 | 266 | $this->app = BabFunctionality::get('App'); |
267 | 267 | } |
@@ -318,14 +318,14 @@ discard block |
||
318 | 318 | $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
319 | 319 | |
320 | 320 | if (isset($name)) { |
321 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
321 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
322 | 322 | } else { |
323 | 323 | $this->sortParameterName = 'filter[sort]'; |
324 | 324 | } |
325 | 325 | |
326 | 326 | if (isset($filter['sort'])) { |
327 | 327 | $this->setSortField($filter['sort']); |
328 | - } elseif (! isset($this->sortField)) { |
|
328 | + } elseif (!isset($this->sortField)) { |
|
329 | 329 | |
330 | 330 | if (method_exists($this, 'getDefaultSortField')) { |
331 | 331 | $this->setSortField($this->getDefaultSortField()); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | if (is_array($value)) { |
374 | 374 | foreach ($value as $val) { |
375 | 375 | $val = trim($val); |
376 | - if (! empty($val)) { |
|
376 | + if (!empty($val)) { |
|
377 | 377 | return true; |
378 | 378 | } |
379 | 379 | } |
@@ -530,11 +530,11 @@ discard block |
||
530 | 530 | |
531 | 531 | foreach ($columns as $fieldName => $column) { |
532 | 532 | $field = $column->getField(); |
533 | - if (! $column->isSearchable()) { |
|
533 | + if (!$column->isSearchable()) { |
|
534 | 534 | continue; |
535 | 535 | } |
536 | 536 | |
537 | - if (! ($field instanceof ORMField)) { |
|
537 | + if (!($field instanceof ORMField)) { |
|
538 | 538 | $field = null; |
539 | 539 | } |
540 | 540 | |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | } |
561 | 561 | } |
562 | 562 | |
563 | - if (! $this->submit) { |
|
563 | + if (!$this->submit) { |
|
564 | 564 | $this->submit = $W->SubmitButton(); |
565 | 565 | $this->submit->setLabel(Widget_translate('Apply filter')); |
566 | 566 | } |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | // $this->select->addClass(FuncIcons::ICON_LEFT_16); |
595 | 595 | |
596 | 596 | foreach ($filterNames as $filterName) { |
597 | - $filter = $W->getUserConfiguration($controller->getModelViewDefaultId() . '/filters/' . $filterName, 'widgets', false); |
|
597 | + $filter = $W->getUserConfiguration($controller->getModelViewDefaultId().'/filters/'.$filterName, 'widgets', false); |
|
598 | 598 | |
599 | 599 | // $this->select->addItem( |
600 | 600 | // $W->Link( |
@@ -666,7 +666,7 @@ discard block |
||
666 | 666 | $input->addClass('widget-100pc'); |
667 | 667 | |
668 | 668 | $formItem = $this->handleFilterLabel($label, $input); |
669 | - $formItem->addClass('compact', 'field_' . $fieldName); |
|
669 | + $formItem->addClass('compact', 'field_'.$fieldName); |
|
670 | 670 | |
671 | 671 | return $formItem; |
672 | 672 | } |
@@ -707,14 +707,14 @@ discard block |
||
707 | 707 | // $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
708 | 708 | |
709 | 709 | if (isset($name)) { |
710 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
710 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
711 | 711 | } else { |
712 | 712 | $this->sortParameterName = 'filter[sort]'; |
713 | 713 | } |
714 | 714 | |
715 | 715 | if (isset($filter['sort'])) { |
716 | 716 | $this->setSortField($filter['sort']); |
717 | - } elseif (! isset($this->sortField)) { |
|
717 | + } elseif (!isset($this->sortField)) { |
|
718 | 718 | |
719 | 719 | if (method_exists($this, 'getDefaultSortField')) { |
720 | 720 | $this->setSortField($this->getDefaultSortField()); |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | */ |
771 | 771 | public function getRecordControllerProxy() |
772 | 772 | { |
773 | - if (! isset($this->recordControllerProxy)) { |
|
773 | + if (!isset($this->recordControllerProxy)) { |
|
774 | 774 | $this->recordControllerProxy = $this->getRecordController()->proxy(); |
775 | 775 | } |
776 | 776 | return $this->recordControllerProxy; |
@@ -789,7 +789,7 @@ discard block |
||
789 | 789 | return null; |
790 | 790 | } |
791 | 791 | |
792 | - if (! isset($description) && $field instanceof ORMField) { |
|
792 | + if (!isset($description) && $field instanceof ORMField) { |
|
793 | 793 | $App = $field->getParentSet()->App(); |
794 | 794 | $description = $App->translate($field->getDescription()); |
795 | 795 | } |
@@ -118,7 +118,7 @@ |
||
118 | 118 | */ |
119 | 119 | public function addItem(?WidgetDisplayableInterface $item = null, $order = null) |
120 | 120 | { |
121 | - if (! isset($this->mainPanel)) { |
|
121 | + if (!isset($this->mainPanel)) { |
|
122 | 122 | $W = bab_widgets(); |
123 | 123 | $this->mainPanel = $W->VBoxLayout(); |
124 | 124 | } |
@@ -109,7 +109,7 @@ |
||
109 | 109 | |
110 | 110 | $attributes = $this->getAttributes(); |
111 | 111 | foreach ($attributes as $attributeName => $attributeValue) { |
112 | - $html .= ' ' . $attributeName . '="' . $attributeValue . '"'; |
|
112 | + $html .= ' '.$attributeName.'="'.$attributeValue.'"'; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | $html .= '>'; |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | public function __construct($id = null, ?WidgetLayout $layout = null) |
47 | 47 | { |
48 | - if (! isset($layout)) { |
|
48 | + if (!isset($layout)) { |
|
49 | 49 | $W = bab_Widgets(); |
50 | 50 | $layout = $W->FlowLayout()->setHorizontalSpacing(1, 'em'); |
51 | 51 | $layout->setVerticalAlign('top'); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | public function display(WidgetCanvas $canvas) |
101 | 101 | { |
102 | - if (! $this->local) { |
|
102 | + if (!$this->local) { |
|
103 | 103 | $this->addClass('widget-toolbar'); |
104 | 104 | } else { |
105 | 105 | $this->addClass('app-toolbar'); |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | $displayFieldName = $displayField['fieldname']; |
347 | 347 | $parameters = $displayField['parameters']; |
348 | 348 | $label = isset($parameters['label']) && !empty($parameters['label']) ? $parameters['label'] : null; |
349 | - $displayFieldMethod = '_' . $displayFieldName; |
|
349 | + $displayFieldMethod = '_'.$displayFieldName; |
|
350 | 350 | if (!$isGroupField && method_exists($this, $displayFieldMethod)) { |
351 | 351 | $item = $this->$displayFieldMethod($customSection, $label); |
352 | 352 | } else { |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | '', |
413 | 413 | $this->record->getController()->editSection($this->record->getFrontId(), $customSection->id) |
414 | 414 | )->addClass('widget-actionbutton', 'section-button', 'icon', FuncIcons::ACTIONS_DOCUMENT_EDIT) |
415 | - ->setOpenMode(WidgetLink::OPEN_DIALOG)->setDialogClass('customSectionEditorDialog ' . $customSection->classname . ' ' . $customSection->editDialogClass) |
|
415 | + ->setOpenMode(WidgetLink::OPEN_DIALOG)->setDialogClass('customSectionEditorDialog '.$customSection->classname.' '.$customSection->editDialogClass) |
|
416 | 416 | ); |
417 | 417 | } |
418 | 418 | |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | |
604 | 604 | $displayFieldName = $field['fieldname']; |
605 | 605 | |
606 | - $displayFieldMethod = '_' . $displayFieldName; |
|
606 | + $displayFieldMethod = '_'.$displayFieldName; |
|
607 | 607 | |
608 | 608 | if (strpos($displayFieldMethod, '__subSection') !== false) { |
609 | 609 | $item = $this->__subSection($customSection, $field); |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | |
657 | 657 | $displayFieldName = $field['fieldname']; |
658 | 658 | |
659 | - $displayFieldMethod = '_' . $displayFieldName; |
|
659 | + $displayFieldMethod = '_'.$displayFieldName; |
|
660 | 660 | |
661 | 661 | if (strpos($displayFieldMethod, '__fieldsGroup') !== false) { |
662 | 662 | $item = $this->__fieldsGroup($customSection, $field); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | $parentField = $this->criteria->getField(); |
86 | 86 | |
87 | - if (! isset($parentField)) { |
|
87 | + if (!isset($parentField)) { |
|
88 | 88 | return null; |
89 | 89 | } |
90 | 90 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | if (empty($foreignFieldDescription)) { |
163 | 163 | $foreignFieldDescription = $foreignFieldName; |
164 | 164 | } |
165 | - $foreignPath = $path . '/' . $foreignRecordSetField->getPath(); |
|
165 | + $foreignPath = $path.'/'.$foreignRecordSetField->getPath(); |
|
166 | 166 | |
167 | 167 | $recordSetFieldSelect->addOption($foreignPath, $foreignFieldDescription, $fieldName); |
168 | 168 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | foreach ($foreignRecordSetFields as $foreignFieldName => $foreignRecordSetField) { |
185 | 185 | $foreignFieldDescription = $foreignFieldName; |
186 | - $foreignPath = $path . '/' . $foreignFieldName; |
|
186 | + $foreignPath = $path.'/'.$foreignFieldName; |
|
187 | 187 | |
188 | 188 | $recordSetFieldSelect->addOption($foreignPath, $foreignFieldDescription, $fieldName); |
189 | 189 |
@@ -145,12 +145,12 @@ discard block |
||
145 | 145 | $extraExtraLargeDeviceClassnames = array(); //XXL |
146 | 146 | |
147 | 147 | for ($i = 1; $i <= 12; $i++) { |
148 | - $extraSmallDeviceClassnames['col-xs-' . $i] = $i; |
|
149 | - $smallDeviceClassnames['col-sm-' . $i] = $i; |
|
150 | - $mediumDeviceClassnames['col-md-' . $i] = $i; |
|
151 | - $largeDeviceClassnames['col-lg-' . $i] = $i; |
|
152 | - $extraLargeDeviceClassnames['col-xl-' . $i] = $i; |
|
153 | - $extraExtraLargeDeviceClassnames['col-xxl-' . $i] = $i; |
|
148 | + $extraSmallDeviceClassnames['col-xs-'.$i] = $i; |
|
149 | + $smallDeviceClassnames['col-sm-'.$i] = $i; |
|
150 | + $mediumDeviceClassnames['col-md-'.$i] = $i; |
|
151 | + $largeDeviceClassnames['col-lg-'.$i] = $i; |
|
152 | + $extraLargeDeviceClassnames['col-xl-'.$i] = $i; |
|
153 | + $extraExtraLargeDeviceClassnames['col-xxl-'.$i] = $i; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | $box = $W->FlexItems()->setWrap(WidgetFlexLayout::FLEX_WRAP_WRAP)->setJustifyContent(WidgetFlexLayout::FLEX_JUSTIFY_CONTENT_SPACE_BETWEEN); |
@@ -185,8 +185,8 @@ discard block |
||
185 | 185 | foreach ($sizes as $sizePrefix => $size) { |
186 | 186 | $box->addItem( |
187 | 187 | $this->labelledField( |
188 | - sprintf('%s (%s)', $size['label'], 'col-' . $sizePrefix . '-*'), |
|
189 | - $W->Select()->addOptions($size['classnames'])->setValue('col-' . $sizePrefix . '-12'), |
|
188 | + sprintf('%s (%s)', $size['label'], 'col-'.$sizePrefix.'-*'), |
|
189 | + $W->Select()->addOptions($size['classnames'])->setValue('col-'.$sizePrefix.'-12'), |
|
190 | 190 | array('sizePolicy', $sizePrefix) |
191 | 191 | )->addAttribute('style', 'flex-basis:50%') |
192 | 192 | ); |
@@ -118,7 +118,7 @@ |
||
118 | 118 | $columns = $this->tableview->getVisibleColumns(); |
119 | 119 | |
120 | 120 | foreach ($columns as $path => $column) { |
121 | - if (! $column->isExportable()) { |
|
121 | + if (!$column->isExportable()) { |
|
122 | 122 | continue; |
123 | 123 | } |
124 | 124 | $columnList->addItem($W->FlexItems($W->LabelledWidget($column->getSelectableName(), $checkbox = $W->CheckBox() |