1 | <?php |
||
2 | |||
3 | namespace Epesi\Base\Dashboard\Models; |
||
4 | |||
5 | use atk4\data\Model; |
||
6 | use Epesi\Core\Data\HasEpesiConnection; |
||
0 ignored issues
–
show
|
|||
7 | use Epesi\Core\System\User\Database\Models\atk4\User; |
||
8 | |||
9 | class Dashboard extends Model |
||
10 | { |
||
11 | use HasEpesiConnection; |
||
12 | |||
13 | public $table = 'dashboards'; |
||
14 | |||
15 | public function init() |
||
16 | { |
||
17 | parent::init(); |
||
18 | |||
19 | $this->addFields([ |
||
20 | 'name' => ['type' => 'string'], |
||
21 | 'position' => ['type' => 'integer', 'default' => 0] |
||
22 | ]); |
||
23 | |||
24 | $this->hasOne('user', [User::class, 'our_field' => 'user_id']); |
||
25 | |||
26 | $this->hasMany('applets', [DashboardApplet::class, 'their_field' => 'dashboard_id']); |
||
27 | |||
28 | $this->addHook('beforeDelete', function($id) { |
||
29 | $this->withID($id)->ref('applets')->action('delete')->execute(); |
||
30 | }); |
||
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