ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilCronJobEntity Class Reference
+ Collaboration diagram for ilCronJobEntity:

Public Member Functions

 __construct (private readonly ilCronJob $job, array $record, private readonly bool $isPlugin=false)
 ilCronJobEntity constructor. More...
 
 getJob ()
 
 getJobId ()
 
 getComponent ()
 
 getScheduleType ()
 
 getScheduleValue ()
 
 getJobStatus ()
 
 getJobStatusUsrId ()
 
 getJobStatusType ()
 
 getJobStatusTimestamp ()
 
 getJobResultStatus ()
 
 getJobResultUsrId ()
 
 getJobResultCode ()
 
 getJobResultMessage ()
 
 getJobResultType ()
 
 getJobResultTimestamp ()
 
 getClass ()
 
 getPath ()
 
 getRunningTimestamp ()
 
 getJobResultDuration ()
 
 getAliveTimestamp ()
 
 isPlugin ()
 
 getEffectiveScheduleType ()
 
 getEffectiveScheduleValue ()
 
 getEffectiveTitle ()
 

Private Member Functions

 mapRecord (array $record)
 

Private Attributes

string $jobId
 
string $component
 
CronJobScheduleType $scheduleType
 
int $scheduleValue
 
int $jobStatus
 
int $jobStatusUsrId
 
int $jobStatusType
 
int $jobStatusTimestamp
 
int $jobResultStatus
 
int $jobResultUsrId
 
string $jobResultCode
 
string $jobResultMessage
 
int $jobResultType
 
int $jobResultTimestamp
 
string $class
 
string $path
 
int $runningTimestamp
 
int $jobResultDuration
 
int $aliveTimestamp
 

Detailed Description

Definition at line 23 of file class.ilCronJobEntity.php.

Constructor & Destructor Documentation

◆ __construct()

ilCronJobEntity::__construct ( private readonly ilCronJob  $job,
array  $record,
private readonly bool  $isPlugin = false 
)

ilCronJobEntity constructor.

Parameters
ilCronJob$job
array<string,mixed>$record
bool$isPlugin

Definition at line 51 of file class.ilCronJobEntity.php.

References mapRecord().

52  {
53  $this->mapRecord($record);
54  }
mapRecord(array $record)
+ Here is the call graph for this function:

Member Function Documentation

◆ getAliveTimestamp()

ilCronJobEntity::getAliveTimestamp ( )

Definition at line 177 of file class.ilCronJobEntity.php.

References $aliveTimestamp.

Referenced by ilCronManagerTableGUI\populate().

177  : int
178  {
179  return $this->aliveTimestamp;
180  }
+ Here is the caller graph for this function:

◆ getClass()

ilCronJobEntity::getClass ( )

Definition at line 157 of file class.ilCronJobEntity.php.

References $class.

157  : string
158  {
159  return $this->class;
160  }

◆ getComponent()

ilCronJobEntity::getComponent ( )

Definition at line 92 of file class.ilCronJobEntity.php.

References $component.

Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableFilterMediator\filteredJobs(), getEffectiveTitle(), and ilCronManagerTableGUI\populate().

92  : string
93  {
94  return $this->component;
95  }
+ Here is the caller graph for this function:

◆ getEffectiveScheduleType()

ilCronJobEntity::getEffectiveScheduleType ( )

Definition at line 187 of file class.ilCronJobEntity.php.

References getJob(), and getScheduleType().

Referenced by ilCronManagerTableFilterMediator\filteredJobs(), ilCronManagerTableGUI\formatSchedule(), and ilCronManagerTableGUI\populate().

188  {
189  $type = $this->getScheduleType();
190  if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
191  $type = $this->getJob()->getDefaultScheduleType();
192  }
193 
194  return $type;
195  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveScheduleValue()

ilCronJobEntity::getEffectiveScheduleValue ( )

Definition at line 197 of file class.ilCronJobEntity.php.

References getJob(), getScheduleType(), getScheduleValue(), and ILIAS\Repository\int().

Referenced by ilCronManagerTableGUI\formatSchedule(), and ilCronManagerTableGUI\populate().

197  : int
198  {
199  $type = $this->getScheduleType();
200  $value = $this->getScheduleValue();
201  if (!$type || !$this->getJob()->hasFlexibleSchedule()) {
202  $value = (int) $this->getJob()->getDefaultScheduleValue();
203  }
204 
205  return $value;
206  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveTitle()

ilCronJobEntity::getEffectiveTitle ( )

Definition at line 208 of file class.ilCronJobEntity.php.

References $id, getComponent(), getJob(), getJobId(), and isPlugin().

Referenced by ilCronManagerTableFilterMediator\filteredJobs(), and ilCronManagerTableGUI\populate().

208  : string
209  {
210  $id = $this->getJobId();
211  if ($this->isPlugin()) {
212  $id = 'pl__' . $this->getComponent() . '__' . $id;
213  }
214 
215  $title = $this->getJob()->getTitle();
216  if ($title === '') {
217  $title = $id;
218  }
219 
220  return $title;
221  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getJob()

ilCronJobEntity::getJob ( )

Definition at line 82 of file class.ilCronJobEntity.php.

Referenced by getEffectiveScheduleType(), getEffectiveScheduleValue(), getEffectiveTitle(), and ilCronManagerTableGUI\populate().

82  : ilCronJob
83  {
84  return $this->job;
85  }
+ Here is the caller graph for this function:

◆ getJobId()

ilCronJobEntity::getJobId ( )

Definition at line 87 of file class.ilCronJobEntity.php.

References $jobId.

Referenced by getEffectiveTitle(), ilCronManagerTableGUI\populate(), and CronJobEntityTest\testCollectionCanBeFilteredAndSliced().

87  : string
88  {
89  return $this->jobId;
90  }
+ Here is the caller graph for this function:

◆ getJobResultCode()

ilCronJobEntity::getJobResultCode ( )

Definition at line 137 of file class.ilCronJobEntity.php.

References $jobResultCode.

Referenced by ilCronManagerTableGUI\formatResultInfo().

137  : string
138  {
139  return $this->jobResultCode;
140  }
+ Here is the caller graph for this function:

◆ getJobResultDuration()

ilCronJobEntity::getJobResultDuration ( )

Definition at line 172 of file class.ilCronJobEntity.php.

References $jobResultDuration.

Referenced by ilCronManagerTableGUI\formatResultInfo().

172  : int
173  {
175  }
+ Here is the caller graph for this function:

◆ getJobResultMessage()

ilCronJobEntity::getJobResultMessage ( )

Definition at line 142 of file class.ilCronJobEntity.php.

References $jobResultMessage.

Referenced by ilCronManagerTableGUI\formatResultInfo().

142  : string
143  {
145  }
+ Here is the caller graph for this function:

◆ getJobResultStatus()

ilCronJobEntity::getJobResultStatus ( )

Definition at line 127 of file class.ilCronJobEntity.php.

References $jobResultStatus.

Referenced by ilCronManagerTableFilterMediator\filteredJobs(), ilCronManagerTableGUI\formatResult(), and ilCronManagerTableGUI\populate().

127  : int
128  {
129  return $this->jobResultStatus;
130  }
+ Here is the caller graph for this function:

◆ getJobResultTimestamp()

ilCronJobEntity::getJobResultTimestamp ( )

Definition at line 152 of file class.ilCronJobEntity.php.

References $jobResultTimestamp.

Referenced by ilCronManagerTableGUI\populate().

152  : int
153  {
155  }
+ Here is the caller graph for this function:

◆ getJobResultType()

ilCronJobEntity::getJobResultType ( )

Definition at line 147 of file class.ilCronJobEntity.php.

References $jobResultType.

Referenced by ilCronManagerTableGUI\formatResultInfo().

147  : int
148  {
149  return $this->jobResultType;
150  }
+ Here is the caller graph for this function:

◆ getJobResultUsrId()

ilCronJobEntity::getJobResultUsrId ( )

Definition at line 132 of file class.ilCronJobEntity.php.

References $jobResultUsrId.

Referenced by ilCronManagerTableGUI\formatResultInfo().

132  : int
133  {
134  return $this->jobResultUsrId;
135  }
+ Here is the caller graph for this function:

◆ getJobStatus()

ilCronJobEntity::getJobStatus ( )

Definition at line 107 of file class.ilCronJobEntity.php.

References $jobStatus.

Referenced by ilCronManagerTableFilterMediator\filteredJobs(), and ilCronManagerTableGUI\populate().

107  : int
108  {
109  return $this->jobStatus;
110  }
+ Here is the caller graph for this function:

◆ getJobStatusTimestamp()

ilCronJobEntity::getJobStatusTimestamp ( )

Definition at line 122 of file class.ilCronJobEntity.php.

References $jobStatusTimestamp.

Referenced by ilCronManagerTableGUI\formatStatusInfo().

122  : int
123  {
125  }
+ Here is the caller graph for this function:

◆ getJobStatusType()

ilCronJobEntity::getJobStatusType ( )

Definition at line 117 of file class.ilCronJobEntity.php.

References $jobStatusType.

Referenced by ilCronManagerTableGUI\formatStatusInfo().

117  : int
118  {
119  return $this->jobStatusType;
120  }
+ Here is the caller graph for this function:

◆ getJobStatusUsrId()

ilCronJobEntity::getJobStatusUsrId ( )

Definition at line 112 of file class.ilCronJobEntity.php.

References $jobStatusUsrId.

Referenced by ilCronManagerTableGUI\formatStatusInfo().

112  : int
113  {
114  return $this->jobStatusUsrId;
115  }
+ Here is the caller graph for this function:

◆ getPath()

ilCronJobEntity::getPath ( )

Definition at line 162 of file class.ilCronJobEntity.php.

References $path.

162  : string
163  {
164  return $this->path;
165  }

◆ getRunningTimestamp()

ilCronJobEntity::getRunningTimestamp ( )

Definition at line 167 of file class.ilCronJobEntity.php.

References $runningTimestamp.

Referenced by ilCronManagerTableGUI\populate().

167  : int
168  {
170  }
+ Here is the caller graph for this function:

◆ getScheduleType()

ilCronJobEntity::getScheduleType ( )

Definition at line 97 of file class.ilCronJobEntity.php.

References $scheduleType.

Referenced by getEffectiveScheduleType(), getEffectiveScheduleValue(), and ilCronManagerTableGUI\populate().

98  {
99  return $this->scheduleType;
100  }
CronJobScheduleType $scheduleType
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ getScheduleValue()

ilCronJobEntity::getScheduleValue ( )

Definition at line 102 of file class.ilCronJobEntity.php.

References $scheduleValue.

Referenced by getEffectiveScheduleValue().

102  : int
103  {
104  return $this->scheduleValue;
105  }
+ Here is the caller graph for this function:

◆ isPlugin()

ilCronJobEntity::isPlugin ( )

Definition at line 182 of file class.ilCronJobEntity.php.

Referenced by ilCronManagerTableFilterMediator\filter(), ilCronManagerTableFilterMediator\filteredJobs(), getEffectiveTitle(), and ilCronManagerTableGUI\populate().

182  : bool
183  {
184  return $this->isPlugin;
185  }
+ Here is the caller graph for this function:

◆ mapRecord()

ilCronJobEntity::mapRecord ( array  $record)
private
Parameters
array<string,mixed>$record

Definition at line 59 of file class.ilCronJobEntity.php.

References ILIAS\Repository\int().

Referenced by __construct().

59  : void
60  {
61  $this->jobId = (string) $record['job_id'];
62  $this->component = (string) $record['component'];
63  $this->scheduleType = is_numeric($record['schedule_type']) ? CronJobScheduleType::tryFrom((int) $record['schedule_type']) : null;
64  $this->scheduleValue = (int) $record['schedule_value'];
65  $this->jobStatus = (int) $record['job_status'];
66  $this->jobStatusUsrId = (int) $record['job_status_user_id'];
67  $this->jobStatusType = (int) $record['job_status_type'];
68  $this->jobStatusTimestamp = (int) $record['job_status_ts'];
69  $this->jobResultStatus = (int) $record['job_result_status'];
70  $this->jobResultUsrId = (int) $record['job_result_user_id'];
71  $this->jobResultCode = (string) $record['job_result_code'];
72  $this->jobResultMessage = (string) $record['job_result_message'];
73  $this->jobResultType = (int) $record['job_result_type'];
74  $this->jobResultTimestamp = (int) $record['job_result_ts'];
75  $this->class = (string) $record['class'];
76  $this->path = (string) $record['path'];
77  $this->runningTimestamp = (int) $record['running_ts'];
78  $this->jobResultDuration = (int) $record['job_result_dur'];
79  $this->aliveTimestamp = (int) $record['alive_ts'];
80  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $aliveTimestamp

int ilCronJobEntity::$aliveTimestamp
private

Definition at line 43 of file class.ilCronJobEntity.php.

Referenced by getAliveTimestamp().

◆ $class

string ilCronJobEntity::$class
private

Definition at line 39 of file class.ilCronJobEntity.php.

Referenced by getClass().

◆ $component

string ilCronJobEntity::$component
private

Definition at line 26 of file class.ilCronJobEntity.php.

Referenced by getComponent().

◆ $jobId

string ilCronJobEntity::$jobId
private

Definition at line 25 of file class.ilCronJobEntity.php.

Referenced by getJobId().

◆ $jobResultCode

string ilCronJobEntity::$jobResultCode
private

Definition at line 35 of file class.ilCronJobEntity.php.

Referenced by getJobResultCode().

◆ $jobResultDuration

int ilCronJobEntity::$jobResultDuration
private

Definition at line 42 of file class.ilCronJobEntity.php.

Referenced by getJobResultDuration().

◆ $jobResultMessage

string ilCronJobEntity::$jobResultMessage
private

Definition at line 36 of file class.ilCronJobEntity.php.

Referenced by getJobResultMessage().

◆ $jobResultStatus

int ilCronJobEntity::$jobResultStatus
private

Definition at line 33 of file class.ilCronJobEntity.php.

Referenced by getJobResultStatus().

◆ $jobResultTimestamp

int ilCronJobEntity::$jobResultTimestamp
private

Definition at line 38 of file class.ilCronJobEntity.php.

Referenced by getJobResultTimestamp().

◆ $jobResultType

int ilCronJobEntity::$jobResultType
private

Definition at line 37 of file class.ilCronJobEntity.php.

Referenced by getJobResultType().

◆ $jobResultUsrId

int ilCronJobEntity::$jobResultUsrId
private

Definition at line 34 of file class.ilCronJobEntity.php.

Referenced by getJobResultUsrId().

◆ $jobStatus

int ilCronJobEntity::$jobStatus
private

Definition at line 29 of file class.ilCronJobEntity.php.

Referenced by getJobStatus().

◆ $jobStatusTimestamp

int ilCronJobEntity::$jobStatusTimestamp
private

Definition at line 32 of file class.ilCronJobEntity.php.

Referenced by getJobStatusTimestamp().

◆ $jobStatusType

int ilCronJobEntity::$jobStatusType
private

Definition at line 31 of file class.ilCronJobEntity.php.

Referenced by getJobStatusType().

◆ $jobStatusUsrId

int ilCronJobEntity::$jobStatusUsrId
private

Definition at line 30 of file class.ilCronJobEntity.php.

Referenced by getJobStatusUsrId().

◆ $path

string ilCronJobEntity::$path
private

Definition at line 40 of file class.ilCronJobEntity.php.

Referenced by getPath().

◆ $runningTimestamp

int ilCronJobEntity::$runningTimestamp
private

Definition at line 41 of file class.ilCronJobEntity.php.

Referenced by getRunningTimestamp().

◆ $scheduleType

CronJobScheduleType ilCronJobEntity::$scheduleType
private

Definition at line 27 of file class.ilCronJobEntity.php.

Referenced by getScheduleType().

◆ $scheduleValue

int ilCronJobEntity::$scheduleValue
private

Definition at line 28 of file class.ilCronJobEntity.php.

Referenced by getScheduleValue().


The documentation for this class was generated from the following file: