20 private bool $write_access
24 $this->field_factory =
$DIC->ui()->factory()->input()->field();
30 return $this->field_factory->section(
38 $possible = $this->
settings->isPreviewPossible();
40 $activated = $this->field_factory
42 $this->
language->txt(
'enable_preview'),
43 $this->language->txt(
'enable_preview_info')
45 ->withDisabled(!$this->write_access || !$possible)
46 ->withValue($this->
settings->isPreviewEnabled())
47 ->withAdditionalTransformation(
48 $this->
refinery->custom()->transformation(function (
bool $v):
void {
49 $this->
settings->setPreviewEnabled($v);
53 $image_size = $this->field_factory
55 $this->
language->txt(
'preview_image_size'),
56 $this->language->txt(
'preview_image_size_info')
58 ->withDisabled(!$this->write_access || !$possible)
60 ->withValue($this->
settings->getImageSize())
61 ->withAdditionalTransformation(
62 $this->
refinery->custom()->transformation(function (
int $v):
void {
67 $persisting = $this->field_factory
69 $this->
language->txt(
'preview_persisting'),
70 $this->language->txt(
'preview_persisting_info')
72 ->withDisabled(!$this->write_access || !$possible)
73 ->withValue($this->
settings->isPersisting())
74 ->withAdditionalTransformation(
75 $this->
refinery->custom()->transformation(function (
bool $v):
void {
80 $max_previews = $this->field_factory
82 $this->
language->txt(
'max_previews_per_object'),
83 $this->language->txt(
'max_previews_per_object_info')
85 ->withDisabled(!$this->write_access || !$possible)
86 ->withValue($this->
settings->getMaximumPreviews())
87 ->withAdditionalTransformation(
88 $this->
refinery->custom()->transformation(function (
int $v):
void {
89 $this->
settings->setMaximumPreviews($v);
93 $tile_previews = $this->field_factory
95 $this->
language->txt(
'previews_for_tiles'),
96 $this->language->txt(
'previews_for_tiles_info')
98 ->withDisabled(!$this->write_access || !$possible)
99 ->withValue($this->
settings->hasTilePreviews())
100 ->withAdditionalTransformation(
101 $this->
refinery->custom()->transformation(function (
bool $v):
void {
102 $this->
settings->setTilePreviews($v);
106 return $this->field_factory->group(
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...