Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskonsite-архив-перенесен
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitry Korolev
taskonsite-архив-перенесен
Commits
663225ff
Commit
663225ff
authored
Feb 03, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Изменен родительский класс, добавлены некоторые обязательные условия
parent
742ca28a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
common/modules/triggers/models/TriggerCondition.php
common/modules/triggers/models/TriggerCondition.php
+21
-3
No files found.
common/modules/triggers/models/TriggerCondition.php
View file @
663225ff
...
@@ -13,8 +13,9 @@ use Yii;
...
@@ -13,8 +13,9 @@ use Yii;
* @property integer $condition_id
* @property integer $condition_id
*
*
* @property TriggerTrigger $trigger
* @property TriggerTrigger $trigger
* @property TriggerParam[] $triggerParams
*/
*/
class
TriggerCondition
extends
\
yii\db\ActiveRecord
class
TriggerCondition
extends
\
common\components\ActiveRecordModel
{
{
/**
/**
* @inheritdoc
* @inheritdoc
...
@@ -24,18 +25,27 @@ class TriggerCondition extends \yii\db\ActiveRecord
...
@@ -24,18 +25,27 @@ class TriggerCondition extends \yii\db\ActiveRecord
return
'trigger_condition'
;
return
'trigger_condition'
;
}
}
public
function
name
()
{
return
'Условия триггера'
;
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
public
function
rules
()
public
function
rules
()
{
{
return
[
return
[
[[
'group_number'
,
'trigger_id
,
condition_id'
],
'required'
],
[[
'group_number'
,
'trigger_id
'
,
'
condition_id'
],
'required'
],
[[
'group_number'
,
'trigger_id
,
condition_id'
],
'integer'
],
[[
'group_number'
,
'trigger_id
'
,
'
condition_id'
],
'integer'
],
[[
'trigger_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
TriggerTrigger
::
className
(),
'targetAttribute'
=>
[
'trigger_id'
=>
'id'
]],
[[
'trigger_id'
],
'exist'
,
'skipOnError'
=>
true
,
'targetClass'
=>
TriggerTrigger
::
className
(),
'targetAttribute'
=>
[
'trigger_id'
=>
'id'
]],
];
];
}
}
public
function
behaviors
(){
return
[];
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
...
@@ -56,4 +66,12 @@ class TriggerCondition extends \yii\db\ActiveRecord
...
@@ -56,4 +66,12 @@ class TriggerCondition extends \yii\db\ActiveRecord
{
{
return
$this
->
hasOne
(
TriggerTrigger
::
className
(),
[
'id'
=>
'trigger_id'
]);
return
$this
->
hasOne
(
TriggerTrigger
::
className
(),
[
'id'
=>
'trigger_id'
]);
}
}
/**
* @return \yii\db\ActiveQuery
*/
public
function
getTriggerParams
()
{
return
$this
->
hasMany
(
TriggerParam
::
className
(),
[
'condition_id'
=>
'id'
]);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment