68 $this->settings =
new ilSetting(
"preview");
69 $this->preview_enabled = $this->settings->get(
'preview_enabled',
false) ==
true;
70 $this->max_previews = $this->settings->get(
'max_previews_per_object', self::MAX_PREVIEWS_DEFAULT);
81 $instance->preview_enabled = $a_value ==
true;
147 $instance->image_quality =
self::adjustNumeric($a_value, self::IMAGE_QUALITY_MIN, self::IMAGE_QUALITY_MAX, self::IMAGE_QUALITY_DEFAULT);
167 if (self::$instance ==
null)
186 if (is_numeric($value))
189 $value = (int)$value;
192 else if ($value > $max)
static isPreviewEnabled()
Gets whether the preview functionality is enabled.
static setImageQuality($a_value)
Sets the quality (compression) of the preview images (1-100).
const MAX_PREVIEWS_DEFAULT
static adjustNumeric($value, $min, $max, $default)
Adjusts the numeric value to fit between the specified minimum and maximum.
static getInstance()
Gets the instance of the ilPreviewSettings.
static getImageSize()
Gets the size of the preview images in pixels.
static setImageSize($a_value)
Sets the size of the preview images in pixels.
static setMaximumPreviews($a_value)
Sets the maximum number of preview pictures per object.
const IMAGE_QUALITY_DEFAULT
__construct()
Private constructor.
static getMaximumPreviews()
Gets the maximum number of preview pictures per object.
static setPreviewEnabled($a_value)
Sets whether the preview functionality is enabled.
static getImageQuality()
Gets the quality (compression) of the preview images (1-100).