77 $this->preview_enabled = (bool) $this->
settings->get(
'preview_enabled',
'0') ===
true;
78 $this->max_previews = $this->
settings->get(
'max_previews_per_object', self::MAX_PREVIEWS_DEFAULT);
89 $instance->preview_enabled = $a_value ===
true;
155 $instance->image_quality =
self::adjustNumeric($a_value, self::IMAGE_QUALITY_MIN, self::IMAGE_QUALITY_MAX, self::IMAGE_QUALITY_DEFAULT);
174 if (self::$instance ===
null) {
184 if (is_numeric($value)) {
186 $value = (
int) $value;
189 } elseif ($value > $max) {
int $image_quality
Defines the quality (compression) of the preview images (1-100).
static setMaximumPreviews(int $a_value)
Sets the maximum number of preview pictures per object.
static isPreviewEnabled()
Gets whether the preview functionality is enabled.
static ilPreviewSettings $instance
The instance of the ilPreviewSettings.
const MAX_PREVIEWS_DEFAULT
static setImageQuality(int $a_value)
Sets the quality (compression) of the preview images (1-100).
ilSetting $settings
Settings object.
static getInstance()
Gets the instance of the ilPreviewSettings.
static getImageSize()
Gets the size of the preview images in pixels.
static setImageSize(int $a_value)
Sets the size of the preview images in pixels.
const IMAGE_QUALITY_DEFAULT
bool $preview_enabled
Indicates whether the preview functionality is enabled.
__construct()
Private constructor.
int $image_size
Defines the maximum width and height of the preview images.
int $max_previews
Defines the maximum number of previews pictures per object.
static getMaximumPreviews()
Gets the maximum number of preview pictures per object.
static getImageQuality()
Gets the quality (compression) of the preview images (1-100).
static adjustNumeric($value, int $min, int $max, int $default)
static setPreviewEnabled(bool $a_value)
Sets whether the preview functionality is enabled.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...