19 declare(strict_types=1);
46 $this->
language->loadLanguageModule(
'wopi');
56 return 'wopi_crawler';
61 return $this->
language->txt(
'wopi_crawler_cronjob_title');
66 return $this->
language->txt(
'wopi_crawler_cronjob_description');
81 return JobScheduleType::WEEKLY;
92 if (!(
bool) $this->
settings->get(
'wopi_activated',
'0')) {
93 $result->setMessage($this->
language->txt(
'wopi_crawler_cronjob_not_activated'));
96 $discovery_url = $this->
settings->get(
'wopi_discovery_url');
98 if (!$this->crawler->validate(
new URI($discovery_url))) {
99 $result->setStatus(JobResult::STATUS_FAIL);
100 $result->setMessage($this->
language->txt(
'msg_error_wopi_invalid_discorvery_url'));
104 $apps = $this->crawler->crawl(
new URI($discovery_url));
105 if ($apps ===
null) {
106 $result->setStatus(JobResult::STATUS_FAIL);
107 $result->setMessage($this->
language->txt(
'wopi_crawler_cronjob_no_apps'));
110 $result->setMessage($this->
language->txt(
'wopi_crawler_cronjob_success'));
111 $this->app_repository->storeCollection($apps, $this->action_repository);
getDefaultScheduleValue()
AppRepository $app_repository
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
ActionRepository $action_repository
language()
description: > Example for rendring a language glyph.