ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilCronUpdateOrgUnitPaths.php
Go to the documentation of this file.
1 <?php
20 
27 {
28  public const ID = "orgunit_paths";
29  protected ilDBInterface $db;
30  protected ilLogger $log;
31  protected ilTree $tree;
32 
33  private ilLanguage $lng;
34 
35  public function __construct()
36  {
37  global $DIC;
38 
39  $this->lng = $DIC->language();
40  }
41 
42  public function getId(): string
43  {
44  return self::ID;
45  }
46 
47  public function getTitle(): string
48  {
49  return $this->lng->txt("update_orgunits");
50  }
51 
52  public function getDescription(): string
53  {
54  return $this->lng->txt("update_orgunits_desc");
55  }
56 
57  public function hasAutoActivation(): bool
58  {
59  return true;
60  }
61 
62  public function hasFlexibleSchedule(): bool
63  {
64  return true;
65  }
66 
68  {
69  return CronJobScheduleType::SCHEDULE_TYPE_DAILY;
70  }
71 
72  public function getDefaultScheduleValue(): ?int
73  {
74  return null;
75  }
76 
77  public function run(): ilCronJobResult
78  {
80  ilOrgUnitPathStorage::writePathByRefId($ref_id);
81  }
82  ilOrgUnitPathStorage::clearDeleted();
83  $result = new ilCronJobResult();
84  $result->setStatus(ilCronJobResult::STATUS_OK);
85 
86  return $result;
87  }
88 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
Class ilCronUpdateOrgUnitPaths.
$ref_id
Definition: ltiauth.php:67