46 $this->logger =
$DIC->logger()->meta();
47 $this->lng =
$DIC->language();
48 $this->lng->loadLanguageModule(
'meta');
58 return $this->lng->txt(
'meta_oer_harvester');
66 return $this->lng->txt(
'meta_oer_harvester_desc');
126 $this->lng->txt(
'meta_oer_target'),
131 $explorer = $target->getExplorerGUI();
132 $explorer->setSelectMode(
'target',
false);
133 $explorer->setRootId(ROOT_FOLDER_ID);
134 $explorer->setTypeWhiteList([
'cat']);
137 $explorer->setPathOpen($this->
settings->getTarget());
138 $target->setValue($this->
settings->getTarget());
141 $target->setRequired(
true);
147 $this->lng->txt(
'meta_oer_copyright_selection'),
150 $checkbox_group->setRequired(
true);
151 $checkbox_group->setValue($this->
settings->getCopyrightTemplates());
152 $checkbox_group->setInfo(
153 $this->lng->txt(
'meta_oer_copyright_selection_info')
158 $copyright_entry->getTitle(),
159 $copyright_entry->getEntryId(),
160 $copyright_entry->getDescription()
162 $checkbox_group->addOption($copyright_checkox);
164 $a_form->
addItem($checkbox_group);
187 $this->logger->info(
'Started cron oer harvester.');
189 $res = $harvester->run();
190 $this->logger->info(
'cron oer harvester finished');
208 switch ($a_form_id) {
211 $a_fields[
'meta_oer_harvester'] =
214 $lng->txt(
'enabled') :
215 $lng->txt(
'disabled')
An exception for terminatinating execution or to throw for unit testing.
This class represents an option in a checkbox group.
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_DAILY
Cron job for definition for oer harvesting.
getDefaultScheduleValue()
Get schedule value.int|array
getDescription()
Get description.string
const CRON_JOB_IDENTIFIER
run()
Run job.ilCronJobResult
hasCustomSettings()
Has cron job any custom setting which can be edited?boolean
addCustomSettingsToForm(ilPropertyFormGUI $a_form)
hasFlexibleSchedule()
Can the schedule be configured?boolean
__construct()
ilOerHarvester constructor.
getTitle()
Get title.string
const DEFAULT_SCHEDULE_VALUE
addToExternalSettingsForm($a_form_id, array &$a_fields, $a_is_active)
Provide external settings for presentation in MD settings.
hasAutoActivation()
Is to be activated on "installation".boolean
saveCustomSettings(ilPropertyFormGUI $a_form)
getDefaultScheduleType()
Get schedule type.int
static _getEntries()
get entries
Cron job for definition for oer harvesting.
foreach($_POST as $key=> $value) $res