19 declare(strict_types=1);
30 protected \ILIAS\ILIASObject\Properties\Aggregator $object_prop;
34 $this->object_prop =
LocalDIC::dic()[
'properties.aggregator'];
41 $obj_prop = $this->object_prop->getFor($obj_id, $type);
43 ->getPropertyTitleAndDescription()
45 $this->addField(
"title",
$inputs[0]);
46 $this->addField(
"description",
$inputs[1]);
54 $obj_prop = $this->object_prop->getFor($obj_id, $type);
56 ->getPropertyTitleAndDescription()
58 $this->addField(
"title",
$inputs[0]);
66 $obj_prop = $this->object_prop->getFor($obj_id, $type);
67 $obj_prop->storePropertyTitleAndDescription(
69 $this->getData(
"title"),
70 $this->getData(
"description")
79 $obj_prop = $this->object_prop->getFor($obj_id, $type);
80 $obj_prop->storePropertyTitleAndDescription(
82 $this->getData(
"title"),
92 $obj_prop = $this->object_prop->getFor($obj_id, $type);
93 $input = $obj_prop->getPropertyTileImage()
95 $this->addField(
"tile", $input,
true);
103 $obj_prop = $this->object_prop->getFor($obj_id, $type);
104 $tile = $this->getData(
"tile");
105 if (!is_null($tile)) {
106 $obj_prop->storePropertyTileImage($this->getData(
"tile"));
114 $obj_prop = $this->object_prop->getFor($obj_id, $type);
115 $input = $obj_prop->getPropertyIsOnline()
117 $this->addField(
"is_online", $input,
true);
125 $obj_prop = $this->object_prop->getFor($obj_id, $type);
126 $obj_prop->storePropertyIsOnline($this->getData(
"is_online"));
133 $start = $end = $visibility =
null;
135 $start = (
int) $activation[
"timing_start"];
136 $end = (
int) $activation[
"timing_end"];
137 $visibility = (bool) $activation[
"visible"];
139 $enabled = ($end > 0) || ($start > 0);
143 $lng->txt(
"rep_time_based_availability"),
149 $this->
lng->txt(
"rep_time_period"),
156 $this->
lng->txt(
"rep_activation_limited_visibility"),
166 $item = new \ilObjectActivation();
167 if (!$this->getData(
"limited")) {
170 $avail = $this->getData(
"availability");
172 if (!is_null($avail) && !is_null($avail[0])) {
173 $from = $avail[0]->getUnixTime();
175 if (!is_null($avail) && !is_null($avail[1])) {
176 $to = $avail[1]->getUnixTime();
178 if ($from > 0 || $to > 0) {
180 $item->setTimingStart($from);
181 $item->setTimingEnd($to);
182 $item->toggleVisible($this->getData(
"visibility"));
187 $item->update($ref_id);
197 $lng = $DIC->language();
199 $lng->loadLanguageModule(
"obj");
201 $form = $this->section(
"add",
$lng->txt(
"obj_features"));
205 $form = $this->checkbox(
207 $lng->txt(
'obj_tool_setting_custom_metadata'),
208 $lng->txt(
'obj_tool_setting_custom_metadata_info'),
218 $form = $this->checkbox(
220 $lng->txt(
'obj_tool_setting_taxonomies'),
239 if (in_array($key, $services)) {
244 if (in_array($key, $services)) {
253 array $additional_template_options = []
258 $additional_template_options
260 if (
sizeof($options) < 2) {
265 if (!$creation_mode) {
271 ) || ($existing_exclusive && $current_value ==
"dtpl_0")) {
273 $options[$current_value] = [$this->
lng->txt(
'not_available')];
276 if ($existing_exclusive) {
278 $keys = array_keys($options);
279 $current_value = $keys[1];
281 $current_value =
'dtpl_0';
285 $form = $this->radio(
287 $this->
lng->txt(
'type'),
292 foreach ($options as
$id =>
$data) {
298 $form = $this->radioOption(
310 array $additional_template_options = []
312 $this->
lng->loadLanguageModule(
'didactic');
313 $existing_exclusive =
false;
315 $options[
'dtpl_0'] = [
316 $this->
lng->txt(
'didactic_default_type'),
318 $this->
lng->txt(
'didactic_default_type_info'),
319 $this->
lng->txt(
'objs_' . $type)
325 foreach ($templates as $template) {
326 if ($template->isEffective((
int) $ref_id)) {
327 $options[
"dtpl_" . $template->getId()] = [
328 $template->getPresentationTitle(),
329 $template->getPresentationDescription()
332 if ($template->isExclusive()) {
333 $existing_exclusive =
true;
339 return [$existing_exclusive, array_merge($options, $additional_template_options)];
346 array $additional_template_options = []
351 $additional_template_options
354 if (
sizeof($options) < 2) {
361 $new_tpl_id = (
int) substr($this->getData(
'didactic_type'), 5);
363 if ($new_tpl_id !== $current_tpl_id) {
365 $this->
ctrl->setParameterByClass(\ilDidacticTemplateGUI::class,
"didactic_template_id", $new_tpl_id);
366 $this->
ctrl->redirectByClass([$gui_class, \ilDidacticTemplateGUI::class],
"confirmTemplateSwitch");
374 if ($this->
http->wrapper()->query()->has(
'didactic_template_id')) {
375 $new_tpl_id = $this->
http->wrapper()->query()->retrieve(
376 'didactic_template_id',
379 $this->
ctrl->saveParameterByClass(\ilDidacticTemplateGUI::class,
"didactic_template_id", $new_tpl_id);
Refinery Factory $refinery
const TIMINGS_DEACTIVATED
Customizing of pimple-DIC for ILIAS.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static lookupTemplateId(int $a_ref_id)
static _writeContainerSetting(int $a_id, string $a_keyword, string $a_value)
static getItem(int $ref_id)
static getInstanceByObjectType(string $a_obj_type)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _lookupContainerSetting(int $a_id, string $a_keyword, ?string $a_default_value=null)