x-systems /
epesi-base
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Epesi\Base\Dashboard\Integration; |
||
| 4 | |||
| 5 | use Epesi\Core\Layout\Integration\Joints\NavMenuJoint; |
||
| 6 | use Illuminate\Support\Facades\Auth; |
||
| 7 | use Epesi\Core\System\Modules\ModuleView; |
||
|
0 ignored issues
–
show
|
|||
| 8 | use Epesi\Base\Dashboard\Models\Dashboard; |
||
| 9 | |||
| 10 | class DashboardNavMenu extends NavMenuJoint |
||
| 11 | { |
||
| 12 | public function items() |
||
| 13 | { |
||
| 14 | $ret = []; |
||
| 15 | |||
| 16 | foreach (Dashboard::create()->addCondition('user_id', Auth::id())->setOrder('position') as $dashboard) { |
||
| 17 | $ret[$dashboard['name']] = [ |
||
| 18 | 'access' => true, |
||
| 19 | 'weight' => $dashboard['position'], |
||
| 20 | 'action' => ModuleView::moduleLink('dashboard', 'body', ['dashboard' => $dashboard->id]) |
||
| 21 | ]; |
||
| 22 | } |
||
| 23 | |||
| 24 | return $ret? [ |
||
| 25 | __('DASHBOARD') => count($ret) > 1? [ |
||
| 26 | 'item' => ['icon' => 'tachometer alternate'], |
||
| 27 | 'access' => true, |
||
| 28 | 'group' => $ret, |
||
| 29 | 'weight' => -10000 |
||
| 30 | ]: array_merge(reset($ret), ['weight' => -10000]), |
||
| 31 | ]: []; |
||
| 32 | } |
||
| 33 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths