1 | <?php |
||
2 | |||
3 | namespace Uccello\Core\Widgets; |
||
4 | |||
5 | use Arrilot\Widgets\AbstractWidget; |
||
0 ignored issues
–
show
|
|||
6 | |||
7 | class SummaryFields extends AbstractWidget |
||
8 | { |
||
9 | /** |
||
10 | * The configuration array. |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $config = [ ]; |
||
15 | |||
16 | /** |
||
17 | * The number of seconds before each reload. |
||
18 | * |
||
19 | * @var int|float |
||
20 | */ |
||
21 | // public $reloadTimeout = 10; |
||
22 | |||
23 | public function placeholder() |
||
24 | { |
||
25 | return 'Loading...'; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Treat this method as a controller action. |
||
30 | * Return view() or other content to display. |
||
31 | */ |
||
32 | public function run() |
||
33 | { |
||
34 | // Get module |
||
35 | $module = ucmodule($this->config['module']); |
||
36 | |||
37 | // Get record |
||
38 | $modelClass = $module->model_class; |
||
0 ignored issues
–
show
|
|||
39 | $record = $modelClass::find($this->config['record_id']); |
||
40 | |||
41 | return view('uccello::widgets.summary_fields', [ |
||
42 | 'config' => $this->config, |
||
43 | 'domain' => ucdomain($this->config['domain']), |
||
44 | 'module' => $module, |
||
45 | 'data' => (object) $this->config['data'], |
||
46 | 'record' => $record, |
||
47 | 'label' => $this->config['data']->label ?? $this->config['labelForTranslation'], |
||
48 | ]); |
||
49 | } |
||
50 | } |
||
51 |
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