@@ -95,15 +95,15 @@ |
||
95 | 95 | <div class="hide-on-small-only hide-on-med-only"> |
96 | 96 | <?php |
97 | 97 | $searchValue = null; |
98 | - if ($selectedFilter && !empty($selectedFilter->conditions->search->{$column['name']})) { |
|
99 | - $searchValue = $selectedFilter->conditions->search->{$column['name']}; |
|
98 | + if ($selectedFilter && !empty($selectedFilter->conditions->search->{$column[ 'name' ]})) { |
|
99 | + $searchValue = $selectedFilter->conditions->search->{$column[ 'name' ]}; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // If a special template exists, use it. Else use the generic template |
103 | 103 | $uitypeViewName = sprintf('uitypes.search.%s', $column[ 'uitype' ]); |
104 | 104 | $uitypeFallbackView = 'uccello::modules.default.uitypes.search.text'; |
105 | 105 | $uitypeViewToInclude = uccello()->view($column[ 'package' ], $module, $uitypeViewName, $uitypeFallbackView); |
106 | - $field = $module->fields()->where('name', $column['name'])->first(); |
|
106 | + $field = $module->fields()->where('name', $column[ 'name' ])->first(); |
|
107 | 107 | ?> |
108 | 108 | @include($uitypeViewToInclude, [ 'field' => $field ]) |
109 | 109 | </div> |
@@ -30,15 +30,15 @@ |
||
30 | 30 | <div class="search hide-on-small-only hide-on-med-only"> |
31 | 31 | <?php |
32 | 32 | $searchValue = null; |
33 | - if (!empty($selectedFilter) && !empty($selectedFilter->conditions->search->{$column['name']})) { |
|
34 | - $searchValue = $selectedFilter->conditions->search->{$column['name']}; |
|
33 | + if (!empty($selectedFilter) && !empty($selectedFilter->conditions->search->{$column[ 'name' ]})) { |
|
34 | + $searchValue = $selectedFilter->conditions->search->{$column[ 'name' ]}; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | // If a special template exists, use it. Else use the generic template |
38 | 38 | $uitypeViewName = sprintf('uitypes.search.%s', $column[ 'uitype' ]); |
39 | 39 | $uitypeFallbackView = 'uccello::modules.default.uitypes.search.text'; |
40 | 40 | $uitypeViewToInclude = uccello()->view($column[ 'package' ], $module, $uitypeViewName, $uitypeFallbackView); |
41 | - $field = $module->fields()->where('name', $column['name'])->first(); |
|
41 | + $field = $module->fields()->where('name', $column[ 'name' ])->first(); |
|
42 | 42 | ?> |
43 | 43 | @include($uitypeViewToInclude, [ 'field' => $field ]) |
44 | 44 | </div> |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | {{-- Badge --}} |
32 | 32 | <?php |
33 | - $countMethod = $relatedlist->method . 'Count'; |
|
33 | + $countMethod = $relatedlist->method.'Count'; |
|
34 | 34 | |
35 | 35 | $model = new $relatedModule->model_class; |
36 | 36 | $count = $model->$countMethod($relatedlist, $record->id); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | @foreach (uccello()->getCapabilities() as $capability) |
42 | 42 | <?php |
43 | 43 | $isApiCapability = strpos($capability->name, 'api-') !== false; |
44 | - $packagePrefix = $capability->package ? $capability->package . '::' : ''; |
|
44 | + $packagePrefix = $capability->package ? $capability->package.'::' : ''; |
|
45 | 45 | ?> |
46 | 46 | <th class="center-align @if ($isApiCapability)for-api hide @endif">{{ trans($packagePrefix . 'capability.' . $capability->name) }}</th> |
47 | 47 | @endforeach |
@@ -21,7 +21,7 @@ |
||
21 | 21 | @foreach (uccello()->getCapabilities() as $capability) |
22 | 22 | <?php |
23 | 23 | $isApiCapability = strpos($capability->name, 'api-') !== false; |
24 | - $packagePrefix = $capability->package ? $capability->package . '::' : ''; |
|
24 | + $packagePrefix = $capability->package ? $capability->package.'::' : ''; |
|
25 | 25 | ?> |
26 | 26 | <th class="center-align @if ($isApiCapability)for-api hide @endif">{{ trans($packagePrefix . 'capability.' . $capability->name) }}</th> |
27 | 27 | @endforeach |
@@ -20,7 +20,7 @@ |
||
20 | 20 | { |
21 | 21 | if ($event->mode === 'create') { |
22 | 22 | Entity::create([ |
23 | - 'id' => (string) Str::uuid(), |
|
23 | + 'id' => (string)Str::uuid(), |
|
24 | 24 | 'module_id' => $event->module->id, |
25 | 25 | 'record_id' => $event->record->getKey(), |
26 | 26 | ]); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | parent::boot(); |
21 | 21 | |
22 | 22 | // Bind domain |
23 | - Route::bind('domain', function ($value) { |
|
23 | + Route::bind('domain', function($value) { |
|
24 | 24 | if (preg_match('`^[0-9]+$`', $value)) { // By id |
25 | 25 | $domain = Domain::findOrFail($value); |
26 | 26 | } else { // By slug |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | }); |
31 | 31 | |
32 | 32 | // Bind module |
33 | - Route::bind('module', function ($value) { |
|
33 | + Route::bind('module', function($value) { |
|
34 | 34 | if (preg_match('`^[0-9]+$`', $value)) { // By id |
35 | 35 | $module = Module::findOrFail($value); |
36 | 36 | } else { // By name |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * @param Module $module |
76 | 76 | * @param boolean $forBlade |
77 | 77 | */ |
78 | - protected function preProcess(?Domain &$domain, Module $module, Request $request, $forBlade=true) |
|
78 | + protected function preProcess(?Domain &$domain, Module $module, Request $request, $forBlade = true) |
|
79 | 79 | { |
80 | 80 | // If we don't use multi domains, find the first one |
81 | 81 | if (!uccello()->useMultiDomains()) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | { |
158 | 158 | $keyName = $getAdminModules ? 'modules_all' : 'modules_not_admin'; |
159 | 159 | |
160 | - return Cache::rememberForever($keyName, function () use($getAdminModules) { |
|
160 | + return Cache::rememberForever($keyName, function() use($getAdminModules) { |
|
161 | 161 | $modules = [ ]; |
162 | 162 | |
163 | 163 | $allModules = Module::all(); |
@@ -215,11 +215,11 @@ discard block |
||
215 | 215 | */ |
216 | 216 | protected function getDomainsTreeHtml() |
217 | 217 | { |
218 | - return Cache::remember('users', 600, function () { // 10 minutes |
|
218 | + return Cache::remember('users', 600, function() { // 10 minutes |
|
219 | 219 | $domainsTreeHtml = '<ul class="tree tree-level-0">'; |
220 | 220 | |
221 | 221 | $rootDomains = app('uccello')->getRootDomains(); |
222 | - foreach($rootDomains as $root) { |
|
222 | + foreach ($rootDomains as $root) { |
|
223 | 223 | |
224 | 224 | $descendants = $root->findDescendants()->get(); |
225 | 225 | |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | |
228 | 228 | $html = $tree->render( |
229 | 229 | 'ul', |
230 | - function ($node) { |
|
230 | + function($node) { |
|
231 | 231 | if (auth()->user()->hasRoleOnDomain($node)) { |
232 | 232 | $currentClass = ''; |
233 | 233 | // if ($node->id === $this->domain->id) { |
@@ -234,8 +234,7 @@ |
||
234 | 234 | // $currentClass = 'class="green-text"'; |
235 | 235 | // } |
236 | 236 | return '<li><a href="'.ucroute('uccello.home', $node).'" '.$currentClass.'>'.$node->name.'</a>{sub-tree}</li>'; |
237 | - } |
|
238 | - elseif (auth()->user()->hasRoleOnDescendantDomain($node)) { |
|
237 | + } elseif (auth()->user()->hasRoleOnDescendantDomain($node)) { |
|
239 | 238 | return '<li>'.$node->name.'{sub-tree}</li>'; |
240 | 239 | } else { |
241 | 240 | return ''; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | protected function getSettingsModule() |
29 | 29 | { |
30 | - return Module::where('name', 'settings')->first(); |
|
30 | + return Module::where('name', 'settings')->first(); |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | public function testModuleActivationCanBeChanged() |