HCE Project DC service web UI
0.2
Hierarchical Cluster Engine DC service web UI
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Pages
Jobs.php
Go to the documentation of this file.
1
<?php
2
19
class
Jobs
extends
CActiveRecord
20
{
24
public
function
tableName
()
25
{
26
return
'job'
;
27
}
28
32
public
function
rules
()
33
{
34
// NOTE: you should only define rules for those attributes that
35
// will receive user inputs.
36
return
array(
37
array(
'job_class, job_status_id'
,
'required'
),
38
array(
'job_status_id'
,
'numerical'
,
'integerOnly'
=>
true
),
39
array(
'job_class'
,
'length'
,
'max'
=> 64),
40
array(
'crontab'
,
'length'
,
'max'
=> 128),
41
array(
'job_data, planned_time, start_time, finish_time, create_time, update_time'
,
'safe'
),
42
// The following rule is used by search().
43
// @todo Please remove those attributes that should not be searched.
44
array(
'id, job_class, job_data, crontab, planned_time, start_time, finish_time, job_status_id, create_time, update_time'
,
'safe'
,
'on'
=>
'search'
),
45
);
46
}
47
51
public
function
relations
()
52
{
53
// NOTE: you may need to adjust the relation name and the related
54
// class name for the relations automatically generated below.
55
return
array(
56
);
57
}
58
62
public
function
attributeLabels
()
63
{
64
return
array(
65
'id'
=>
'ID'
,
66
'job_class'
=>
'Job Class'
,
67
'job_data'
=>
'Job Data'
,
68
'crontab'
=>
'Crontab'
,
69
'planned_time'
=>
'Planned Time'
,
70
'start_time'
=>
'Start Time'
,
71
'finish_time'
=>
'Finish Time'
,
72
'job_status_id'
=>
'Job Status'
,
73
'create_time'
=>
'Create Time'
,
74
'update_time'
=>
'Update Time'
,
75
);
76
}
77
90
public
function
search
()
91
{
92
// @todo Please modify the following code to remove attributes that should not be searched.
93
94
$criteria =
new
CDbCriteria();
95
96
$criteria->compare(
'id'
, $this->
id
,
true
);
97
$criteria->compare(
'job_class'
, $this->job_class,
true
);
98
$criteria->compare(
'job_data'
, $this->job_data,
true
);
99
$criteria->compare(
'crontab'
, $this->crontab,
true
);
100
$criteria->compare(
'planned_time'
, $this->planned_time,
true
);
101
$criteria->compare(
'start_time'
, $this->start_time,
true
);
102
$criteria->compare(
'finish_time'
, $this->finish_time,
true
);
103
$criteria->compare(
'job_status_id'
, $this->job_status_id);
104
$criteria->compare(
'create_time'
, $this->create_time,
true
);
105
$criteria->compare(
'update_time'
, $this->update_time,
true
);
106
107
return
new
CActiveDataProvider($this, array(
108
'criteria'
=> $criteria,
109
'sort'
=> array(
110
'defaultOrder'
=>
'planned_time DESC'
,
111
),
112
));
113
}
114
123
public
static
function
model
($className = __CLASS__)
124
{
125
return
parent::model
($className);
126
}
127
}
app
protected
modules
job
models
Jobs.php
Generated on Tue Jun 30 2015 20:12:35 for HCE Project DC service web UI by
1.8.1.2