@@ -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 |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | continue; |
| 675 | 675 | } |
| 676 | 676 | |
| 677 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 677 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 678 | 678 | |
| 679 | 679 | if ($currentColumn + $nbCol > 12) { |
| 680 | 680 | $this->addItem($row); |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | $parameters = $displayField['parameters']; |
| 703 | 703 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 704 | 704 | $label = isset($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : ''; |
| 705 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 705 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 706 | 706 | |
| 707 | 707 | if (method_exists($this, $displayFieldMethod)) { |
| 708 | 708 | $widget = $this->$displayFieldMethod($customSection, $label); |
@@ -760,7 +760,7 @@ discard block |
||
| 760 | 760 | $parameters = $displayField['parameters']; |
| 761 | 761 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 762 | 762 | $label = isset($parameters['label']) && $parameters['label'] !== '__' ? $parameters['label'] : ''; |
| 763 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 763 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 764 | 764 | |
| 765 | 765 | if (method_exists($this, $displayFieldMethod)) { |
| 766 | 766 | $widget = $this->$displayFieldMethod($customSection, $label); |
@@ -1042,7 +1042,7 @@ discard block |
||
| 1042 | 1042 | $row = $W->Items()->setSizePolicy('row'); |
| 1043 | 1043 | foreach ($customSections as $customSection) { |
| 1044 | 1044 | |
| 1045 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1045 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1046 | 1046 | |
| 1047 | 1047 | if ($currentColumn + $nbCol > 12) { |
| 1048 | 1048 | $this->addItem($row); |
@@ -1069,7 +1069,7 @@ discard block |
||
| 1069 | 1069 | $parameters = $displayField['parameters']; |
| 1070 | 1070 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 1071 | 1071 | $label = isset($parameters['label']) ? $parameters['label'] : ''; |
| 1072 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 1072 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 1073 | 1073 | |
| 1074 | 1074 | if (method_exists($this, $displayFieldMethod)) { |
| 1075 | 1075 | $value = $this->$displayFieldMethod($customSection, $label); |
@@ -1161,7 +1161,7 @@ discard block |
||
| 1161 | 1161 | // we try to select one according to the classname prefix. |
| 1162 | 1162 | list($prefix) = explode('_', get_class($this)); |
| 1163 | 1163 | $functionalityName = ucwords($prefix); |
| 1164 | - $this->app = @bab_functionality::get('App/' . $functionalityName); |
|
| 1164 | + $this->app = @bab_functionality::get('App/'.$functionalityName); |
|
| 1165 | 1165 | if (!$this->app) { |
| 1166 | 1166 | $this->app = @bab_functionality::get('App'); |
| 1167 | 1167 | } |
@@ -1222,7 +1222,7 @@ discard block |
||
| 1222 | 1222 | $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
| 1223 | 1223 | |
| 1224 | 1224 | if (isset($name)) { |
| 1225 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
| 1225 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
| 1226 | 1226 | } else { |
| 1227 | 1227 | $this->sortParameterName = 'filter[sort]'; |
| 1228 | 1228 | } |
@@ -1373,11 +1373,11 @@ discard block |
||
| 1373 | 1373 | |
| 1374 | 1374 | foreach ($columns as $fieldName => $column) { |
| 1375 | 1375 | $field = $column->getField(); |
| 1376 | - if (! $column->isSearchable()) { |
|
| 1376 | + if (!$column->isSearchable()) { |
|
| 1377 | 1377 | continue; |
| 1378 | 1378 | } |
| 1379 | 1379 | |
| 1380 | - if (! ($field instanceof ORM_Field)) { |
|
| 1380 | + if (!($field instanceof ORM_Field)) { |
|
| 1381 | 1381 | $field = null; |
| 1382 | 1382 | } |
| 1383 | 1383 | |
@@ -1394,7 +1394,7 @@ discard block |
||
| 1394 | 1394 | |
| 1395 | 1395 | $formItem = $this->handleFilterLabel($label, $input); |
| 1396 | 1396 | $formItem->setSizePolicy('col-lg-2 col-md-3 col-sm-6 col-xs-12'); |
| 1397 | - $formItem->addClass('field_' . $fieldName); |
|
| 1397 | + $formItem->addClass('field_'.$fieldName); |
|
| 1398 | 1398 | |
| 1399 | 1399 | $mainSearch = (method_exists($column, 'isMainSearch') && $column->isMainSearch()); |
| 1400 | 1400 | |
@@ -1407,7 +1407,7 @@ discard block |
||
| 1407 | 1407 | } |
| 1408 | 1408 | |
| 1409 | 1409 | |
| 1410 | - if (! $this->submit) { |
|
| 1410 | + if (!$this->submit) { |
|
| 1411 | 1411 | $this->submit = $W->SubmitButton(); |
| 1412 | 1412 | $this->submit->setLabel(widget_translate('Filter')); |
| 1413 | 1413 | } |
@@ -1480,7 +1480,7 @@ discard block |
||
| 1480 | 1480 | // $this->setCurrentPage(isset($filter['pageNumber']) ? $filter['pageNumber'] : $pageNumber); |
| 1481 | 1481 | |
| 1482 | 1482 | if (isset($name)) { |
| 1483 | - $this->sortParameterName = $name . '[filter][sort]'; |
|
| 1483 | + $this->sortParameterName = $name.'[filter][sort]'; |
|
| 1484 | 1484 | } else { |
| 1485 | 1485 | $this->sortParameterName = 'filter[sort]'; |
| 1486 | 1486 | } |
@@ -1545,7 +1545,7 @@ discard block |
||
| 1545 | 1545 | |
| 1546 | 1546 | $tableview->setCurrentPage(isset($filterValues['pageNumber']) ? $filterValues['pageNumber'] : 0); |
| 1547 | 1547 | |
| 1548 | - $tableview->sortParameterName = $name . '[filter][sort]'; |
|
| 1548 | + $tableview->sortParameterName = $name.'[filter][sort]'; |
|
| 1549 | 1549 | |
| 1550 | 1550 | if (isset($filterValues['sort'])) { |
| 1551 | 1551 | $tableview->setSortField($filterValues['sort']); |
@@ -1844,7 +1844,7 @@ discard block |
||
| 1844 | 1844 | continue; |
| 1845 | 1845 | } |
| 1846 | 1846 | |
| 1847 | - list(, , $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1847 | + list(,, $nbCol) = explode('-', $customSection->sizePolicy); |
|
| 1848 | 1848 | |
| 1849 | 1849 | if ($currentColumn + $nbCol > 12) { |
| 1850 | 1850 | $this->addItem($row); |
@@ -1886,7 +1886,7 @@ discard block |
||
| 1886 | 1886 | $classname = isset($parameters['classname']) ? $parameters['classname'] : ''; |
| 1887 | 1887 | $label = isset($parameters['label']) ? $parameters['label'] : null; |
| 1888 | 1888 | |
| 1889 | - $displayFieldMethod = '_' . $displayFieldName; |
|
| 1889 | + $displayFieldMethod = '_'.$displayFieldName; |
|
| 1890 | 1890 | if (method_exists($this, $displayFieldMethod)) { |
| 1891 | 1891 | $item = $this->$displayFieldMethod($customSection, $label); |
| 1892 | 1892 | } else { |
@@ -1916,7 +1916,7 @@ discard block |
||
| 1916 | 1916 | } |
| 1917 | 1917 | } |
| 1918 | 1918 | |
| 1919 | - if ($currentColumn + $nbCol> 0) { |
|
| 1919 | + if ($currentColumn + $nbCol > 0) { |
|
| 1920 | 1920 | $this->addItem($row); |
| 1921 | 1921 | } |
| 1922 | 1922 | } |
@@ -2030,7 +2030,7 @@ discard block |
||
| 2030 | 2030 | |
| 2031 | 2031 | $displayable = $field->output($value); |
| 2032 | 2032 | |
| 2033 | - switch(true) { |
|
| 2033 | + switch (true) { |
|
| 2034 | 2034 | case ($field instanceof ORM_TextField): |
| 2035 | 2035 | $displayable = $W->RichText($displayable)->setRenderingOptions(BAB_HTML_ALL ^ BAB_HTML_P); |
| 2036 | 2036 | break; |