@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | if ($filter_is_orderby === true) { |
69 | 69 | (new Order($this->cb))->handle($result, $table); |
70 | 70 | } |
71 | - $limit = is_string($limit) ? (int)$limit : 15; |
|
71 | + $limit = is_string($limit) ? (int) $limit : 15; |
|
72 | 72 | $data['result'] = $result->paginate($limit); |
73 | 73 | |
74 | 74 | $data['columns'] = $columns_table; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | //LISTING INDEX HTML |
81 | 81 | $addAction = $CbCtrl->data['addAction']; |
82 | 82 | |
83 | - if (! empty($CbCtrl->sub_module)) { |
|
83 | + if (!empty($CbCtrl->sub_module)) { |
|
84 | 84 | $addAction = $this->_handleSubModules($addAction); |
85 | 85 | } |
86 | 86 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | //$orig_mainpath = $CbCtrl->data['mainpath']; |
89 | 89 | //$titleField = $CbCtrl->titleField; |
90 | 90 | $number = (request('page', 1) - 1) * $limit + 1; |
91 | - $columnsTable = array_filter($columns_table, function ($col) { |
|
91 | + $columnsTable = array_filter($columns_table, function($col) { |
|
92 | 92 | return $col['visible'] !== false; |
93 | 93 | }); |
94 | 94 | $htmlContents = (new RowContent($CbCtrl))->calculate($data, $number, $columnsTable, $addAction); //end foreach data[result] |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | private function _handleParentTable() |
105 | 105 | { |
106 | 106 | $data = []; |
107 | - $parent = (string)request('parent_table'); |
|
107 | + $parent = (string) request('parent_table'); |
|
108 | 108 | $data['parent_table'] = CRUDBooster::first(request('parent_table'), request('parent_id')); |
109 | 109 | if (request('foreign_key')) { |
110 | 110 | $data['parent_field'] = request('foreign_key'); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | $data['parent_field'] = DbInspector::getTableForeignKey($parent); |
113 | 113 | } |
114 | 114 | |
115 | - if (! $data['parent_field']) { |
|
115 | + if (!$data['parent_field']) { |
|
116 | 116 | return $data; |
117 | 117 | } |
118 | 118 | |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | */ |
131 | 131 | private function _filterForParent($result) |
132 | 132 | { |
133 | - if (! request('parent_id')) { |
|
133 | + if (!request('parent_id')) { |
|
134 | 134 | return null; |
135 | 135 | } |
136 | 136 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | private function _filterOutSoftDeleted($tableColumns, $result) |
146 | 146 | { |
147 | - if (! in_array('deleted_at', $tableColumns)) { |
|
147 | + if (!in_array('deleted_at', $tableColumns)) { |
|
148 | 148 | return; |
149 | 149 | } |
150 | 150 | $result->where($this->table.'.deleted_at', '=', null); |
@@ -203,9 +203,9 @@ discard block |
||
203 | 203 | private function _applyWhereAndQfilters($result, $columnsTable, $table) |
204 | 204 | { |
205 | 205 | if (request('q')) { |
206 | - $result->where(function ($query) use ($columnsTable) { |
|
206 | + $result->where(function($query) use ($columnsTable) { |
|
207 | 207 | foreach ($columnsTable as $col) { |
208 | - if (! $col['field_with']) { |
|
208 | + if (!$col['field_with']) { |
|
209 | 209 | continue; |
210 | 210 | } |
211 | 211 | $query->orwhere($col['field_with'], "like", "%".request("q")."%"); |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | return CRUDBooster::adminPath($module['path']).'?parent_table='.$table_parent.'&parent_columns=' |
250 | 250 | .$module['parent_columns'].'&parent_columns_alias=' |
251 | 251 | .$module['parent_columns_alias'].'&parent_id=[' |
252 | - .(! isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) |
|
252 | + .(!isset($module['custom_parent_id']) ? "id" : $module['custom_parent_id']) |
|
253 | 253 | .']&return_url='.urlencode(Request::fullUrl()).'&foreign_key=' |
254 | 254 | .$module['foreign_key'].'&label='.urlencode($module['label']); |
255 | 255 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | { |
45 | 45 | $ctrl->hookValidate(); |
46 | 46 | |
47 | - if (! $ctrl->validate) { |
|
47 | + if (!$ctrl->validate) { |
|
48 | 48 | return true; |
49 | 49 | } // hook have to return true |
50 | 50 | //todo : translation |
@@ -9,7 +9,7 @@ |
||
9 | 9 | { |
10 | 10 | public static function sidebarMenu() |
11 | 11 | { |
12 | - $conditions = [ |
|
12 | + $conditions = [ |
|
13 | 13 | 'cms_privileges' => CRUDBooster::myPrivilegeId(), |
14 | 14 | 'parent_id' => 0, |
15 | 15 | 'is_active' => 1, |