@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | bab_Widgets()->includePhpClass('widget_InputWidget'); |
| 27 | 27 | bab_Widgets()->includePhpClass('widget_TableModelView'); |
| 28 | 28 | |
| 29 | -require_once dirname(__FILE__) . '/ui.helpers.php'; |
|
| 29 | +require_once dirname(__FILE__).'/ui.helpers.php'; |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * @return Widget_Form |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | continue; |
| 681 | 681 | } |
| 682 | 682 | |
| 683 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 683 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 684 | 684 | |
| 685 | 685 | if ($currentColumn + $nbCol > 12) { |
| 686 | 686 | $this->addItem($row); |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | $parameters = $displayField['parameters']; |
| 709 | 709 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 710 | 710 | $label = isset($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : ''; |
| 711 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 711 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 712 | 712 | |
| 713 | 713 | if (method_exists($this, $displayFieldMethod)) { |
| 714 | 714 | $widget = $this->$displayFieldMethod($customSection); |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | $parameters = $displayField['parameters']; |
| 767 | 767 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 768 | 768 | $label = isset($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : ''; |
| 769 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 769 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 770 | 770 | |
| 771 | 771 | if (method_exists($this, $displayFieldMethod)) { |
| 772 | 772 | $widget = $this->$displayFieldMethod($customSection); |
@@ -1036,7 +1036,7 @@ discard block |
||
| 1036 | 1036 | $row = $W->Items()->setSizePolicy('row'); |
| 1037 | 1037 | foreach ($customSections as $customSection) { |
| 1038 | 1038 | |
| 1039 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1039 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1040 | 1040 | |
| 1041 | 1041 | if ($currentColumn + $nbCol > 12) { |
| 1042 | 1042 | $this->addItem($row); |
@@ -1063,7 +1063,7 @@ discard block |
||
| 1063 | 1063 | $parameters = $displayField['parameters']; |
| 1064 | 1064 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 1065 | 1065 | $label = isset($parameters['label']) ? $parameters['label'] : ''; |
| 1066 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 1066 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 1067 | 1067 | |
| 1068 | 1068 | if (method_exists($this, $displayFieldMethod)) { |
| 1069 | 1069 | $value = $this->$displayFieldMethod($customSection); |
@@ -1154,7 +1154,7 @@ discard block |
||
| 1154 | 1154 | // we try to select one according to the classname prefix. |
| 1155 | 1155 | list($prefix) = explode('_', get_class($this)); |
| 1156 | 1156 | $functionalityName = ucwords($prefix); |
| 1157 | - $this->app = @bab_functionality::get('App/' . $functionalityName); |
|
| 1157 | + $this->app = @bab_functionality::get('App/'.$functionalityName); |
|
| 1158 | 1158 | if (!$this->app) { |
| 1159 | 1159 | $this->app = @bab_functionality::get('App'); |
| 1160 | 1160 | } |
@@ -1215,7 +1215,7 @@ discard block |
||
| 1215 | 1215 | $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
| 1216 | 1216 | |
| 1217 | 1217 | if (isset($name)) { |
| 1218 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
| 1218 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
| 1219 | 1219 | } else { |
| 1220 | 1220 | $this->sortParameterName = 'filter[sort]'; |
| 1221 | 1221 | } |
@@ -1366,11 +1366,11 @@ discard block |
||
| 1366 | 1366 | |
| 1367 | 1367 | foreach ($columns as $fieldName => $column) { |
| 1368 | 1368 | $field = $column->getField(); |
| 1369 | - if (! $column->isSearchable()) { |
|
| 1369 | + if (!$column->isSearchable()) { |
|
| 1370 | 1370 | continue; |
| 1371 | 1371 | } |
| 1372 | 1372 | |
| 1373 | - if (! ($field instanceof ORM_Field)) { |
|
| 1373 | + if (!($field instanceof ORM_Field)) { |
|
| 1374 | 1374 | $field = null; |
| 1375 | 1375 | } |
| 1376 | 1376 | |
@@ -1387,7 +1387,7 @@ discard block |
||
| 1387 | 1387 | |
| 1388 | 1388 | $formItem = $this->handleFilterLabel($label, $input); |
| 1389 | 1389 | $formItem->setSizePolicy('col-lg-2 col-md-3 col-sm-6 col-xs-12'); |
| 1390 | - $formItem->addClass('field_' . $fieldName); |
|
| 1390 | + $formItem->addClass('field_'.$fieldName); |
|
| 1391 | 1391 | |
| 1392 | 1392 | $mainSearch = (method_exists($column, 'isMainSearch') && $column->isMainSearch()); |
| 1393 | 1393 | |
@@ -1400,7 +1400,7 @@ discard block |
||
| 1400 | 1400 | } |
| 1401 | 1401 | |
| 1402 | 1402 | |
| 1403 | - if (! $this->submit) { |
|
| 1403 | + if (!$this->submit) { |
|
| 1404 | 1404 | $this->submit = $W->SubmitButton(); |
| 1405 | 1405 | $this->submit->setLabel(widget_translate('Filter')); |
| 1406 | 1406 | } |
@@ -1473,7 +1473,7 @@ discard block |
||
| 1473 | 1473 | // $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
| 1474 | 1474 | |
| 1475 | 1475 | if (isset($name)) { |
| 1476 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
| 1476 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
| 1477 | 1477 | } else { |
| 1478 | 1478 | $this->sortParameterName = 'filter[sort]'; |
| 1479 | 1479 | } |
@@ -1538,7 +1538,7 @@ discard block |
||
| 1538 | 1538 | |
| 1539 | 1539 | $tableview->setCurrentPage(isset($filterValues['pageNumber']) ? $filterValues['pageNumber'] : 0); |
| 1540 | 1540 | |
| 1541 | - $tableview->sortParameterName = $name . '[filter][sort]'; |
|
| 1541 | + $tableview->sortParameterName = $name.'[filter][sort]'; |
|
| 1542 | 1542 | |
| 1543 | 1543 | if (isset($filterValues['sort'])) { |
| 1544 | 1544 | $tableview->setSortField($filterValues['sort']); |
@@ -1837,7 +1837,7 @@ discard block |
||
| 1837 | 1837 | continue; |
| 1838 | 1838 | } |
| 1839 | 1839 | |
| 1840 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1840 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1841 | 1841 | |
| 1842 | 1842 | if ($currentColumn + $nbCol > 12) { |
| 1843 | 1843 | $this->addItem($row); |
@@ -1879,7 +1879,7 @@ discard block |
||
| 1879 | 1879 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 1880 | 1880 | $label = isset($parameters['label']) ? $parameters['label'] : null; |
| 1881 | 1881 | |
| 1882 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 1882 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 1883 | 1883 | if (method_exists($this, $displayFieldMethod)) { |
| 1884 | 1884 | $item = $this->$displayFieldMethod($customSection, $label); |
| 1885 | 1885 | } else { |
@@ -1908,7 +1908,7 @@ discard block |
||
| 1908 | 1908 | } |
| 1909 | 1909 | } |
| 1910 | 1910 | |
| 1911 | - if ($currentColumn + $nbCol> 0) { |
|
| 1911 | + if ($currentColumn + $nbCol > 0) { |
|
| 1912 | 1912 | $this->addItem($row); |
| 1913 | 1913 | } |
| 1914 | 1914 | } |
@@ -2022,7 +2022,7 @@ discard block |
||
| 2022 | 2022 | |
| 2023 | 2023 | $displayable = $field->output($value); |
| 2024 | 2024 | |
| 2025 | - switch(true) { |
|
| 2025 | + switch (true) { |
|
| 2026 | 2026 | case ($field instanceof ORM_TextField): |
| 2027 | 2027 | $displayable = $W->RichText($displayable)->setRenderingOptions(BAB_HTML_ALL ^ BAB_HTML_P); |
| 2028 | 2028 | break; |