Total Complexity | 6 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Credit extends \roaresearch\yii2\workflow\models\Process |
||
15 | { |
||
16 | /** |
||
17 | * @inheritdoc |
||
18 | */ |
||
19 | public static function tableName() |
||
22 | } |
||
23 | |||
24 | protected function assignmentClass(): string |
||
25 | { |
||
26 | return CreditAssignment::class; |
||
27 | } |
||
28 | |||
29 | protected function workLogClass(): string |
||
30 | { |
||
31 | return CreditWorkLog::class; |
||
32 | } |
||
33 | |||
34 | public function getWorkflowId(): int |
||
35 | { |
||
36 | return $this->workflow_id; |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @inheritdoc |
||
41 | */ |
||
42 | public function rules() |
||
43 | { |
||
44 | return array_merge(parent::rules(), [ |
||
45 | [['workflow_id'], 'required'], |
||
46 | [ |
||
47 | ['workflow_id'], |
||
48 | 'exist', |
||
49 | 'skipOnError' => true, |
||
50 | 'targetClass' => Workflow::class, |
||
51 | 'targetAttribute' => ['workflow_id' => 'id'], |
||
52 | ], |
||
53 | ]); |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @inheritdoc |
||
58 | */ |
||
59 | public function attributeLabels() |
||
64 | ]; |
||
65 | } |
||
66 | } |
||
67 |