-
Notifications
You must be signed in to change notification settings - Fork 245
Expand file tree
/
Copy pathScreenVersion.php
More file actions
52 lines (43 loc) · 1.08 KB
/
ScreenVersion.php
File metadata and controls
52 lines (43 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace ProcessMaker\Models;
use Illuminate\Database\Eloquent\Model;
use ProcessMaker\Contracts\ScreenInterface;
use ProcessMaker\Traits\HasCategories;
class ScreenVersion extends Model implements ScreenInterface
{
use HasCategories;
const categoryClass = ScreenCategory::class;
protected $connection = 'processmaker';
/**
* Attributes that are not mass assignable.
*
* @var array
*/
protected $guarded = [
'id',
'updated_at',
];
protected $casts = [
'config' => 'array',
'computed' => 'array',
'watchers' => 'array',
];
/**
* Set multiple|single categories to the screen
*
* @param string $value
*/
public function setScreenCategoryIdAttribute($value)
{
return $this->setMultipleCategories($value, 'screen_category_id');
}
/**
* Get the associated screen
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function parent()
{
return $this->belongsTo(Screen::class, 'screen_id', 'id');
}
}