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
2231c98f
Commit
2231c98f
authored
Feb 03, 2016
by
Shakarim Sapa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Метод формирующий кнопки для управления триггером вынесен в модель;
parent
d0dfa625
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
common/modules/triggers/components/conditions/Conditions.php
common/modules/triggers/components/conditions/Conditions.php
+10
-0
common/modules/triggers/controllers/TriggerAdminController.php
...n/modules/triggers/controllers/TriggerAdminController.php
+1
-1
common/modules/triggers/models/TriggerTrigger.php
common/modules/triggers/models/TriggerTrigger.php
+0
-5
No files found.
common/modules/triggers/components/conditions/Conditions.php
View file @
2231c98f
...
@@ -103,6 +103,16 @@ class Conditions {
...
@@ -103,6 +103,16 @@ class Conditions {
return
$result
;
return
$result
;
}
}
/**
* @param array $condition_array
* @param null $key
* @return string
*/
public
static
function
getControlButtons
(
$condition_array
=
array
(),
$key
=
null
){
$key
=
(
$key
!==
null
)
?
$key
:
rand
(
100000
,
999999
);
return
'<tr data-key='
.
$key
.
'><td>'
.
Conditions
::
init
()
->
getControlArea
(
$condition_array
,
$key
)
.
'</td></tr>'
;
}
/**
/**
* @param array $condition_array
* @param array $condition_array
* @param $key
* @param $key
...
...
common/modules/triggers/controllers/TriggerAdminController.php
View file @
2231c98f
...
@@ -35,7 +35,7 @@ class TriggerAdminController extends AdminController {
...
@@ -35,7 +35,7 @@ class TriggerAdminController extends AdminController {
}
}
public
function
actionGetandconditionhtml
(){
public
function
actionGetandconditionhtml
(){
$result
=
TriggerTrigger
::
getControlButtons
();
$result
=
Conditions
::
getControlButtons
();
return
(
Yii
::
$app
->
request
->
isAjax
)
?
Json
::
encode
(
$result
)
:
$result
;
return
(
Yii
::
$app
->
request
->
isAjax
)
?
Json
::
encode
(
$result
)
:
$result
;
}
}
...
...
common/modules/triggers/models/TriggerTrigger.php
View file @
2231c98f
...
@@ -107,11 +107,6 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
...
@@ -107,11 +107,6 @@ class TriggerTrigger extends \common\components\ActiveRecordModel
return
$table
;
return
$table
;
}
}
public
static
function
getControlButtons
(
$condition_array
=
array
(),
$key
=
null
){
$key
=
(
$key
!==
null
)
?
$key
:
rand
(
100000
,
999999
);
return
'<tr data-key='
.
$key
.
'><td>'
.
Conditions
::
init
()
->
getControlArea
(
$condition_array
,
$key
)
.
'</td></tr>'
;
}
/**
/**
* @inheritdoc
* @inheritdoc
*/
*/
...
...
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