Definition at line 13 of file class.ilPreviewSettings.php.
◆ __construct()
ilPreviewSettings::__construct |
( |
| ) |
|
|
private |
Private constructor.
Definition at line 66 of file class.ilPreviewSettings.php.
References settings().
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);
◆ adjustNumeric()
static ilPreviewSettings::adjustNumeric |
( |
|
$value, |
|
|
|
$min, |
|
|
|
$max, |
|
|
|
$default |
|
) |
| |
|
staticprivate |
Adjusts the numeric value to fit between the specified minimum and maximum.
If the value is not numeric the default value is returned.
- Parameters
-
object | $value | The value to adjust. |
int | $min | The allowed minimum (inclusive). |
int | $max | The allowed maximum (inclusive). |
int | $default | The default value if the specified value is not numeric. |
- Returns
- The adjusted value.
Definition at line 184 of file class.ilPreviewSettings.php.
References $default.
187 if (is_numeric($value)) {
189 $value = (int) $value;
192 } elseif ($value > $max) {
◆ getImageQuality()
static ilPreviewSettings::getImageQuality |
( |
| ) |
|
|
static |
◆ getImageSize()
static ilPreviewSettings::getImageSize |
( |
| ) |
|
|
static |
◆ getInstance()
static ilPreviewSettings::getInstance |
( |
| ) |
|
|
staticprivate |
◆ getMaximumPreviews()
static ilPreviewSettings::getMaximumPreviews |
( |
| ) |
|
|
static |
◆ isPreviewEnabled()
static ilPreviewSettings::isPreviewEnabled |
( |
| ) |
|
|
static |
◆ setImageQuality()
static ilPreviewSettings::setImageQuality |
( |
|
$a_value | ) |
|
|
static |
Sets the quality (compression) of the preview images (1-100).
- Parameters
-
Definition at line 144 of file class.ilPreviewSettings.php.
References $instance.
147 $instance->image_quality = self::adjustNumeric($a_value, self::IMAGE_QUALITY_MIN, self::IMAGE_QUALITY_MAX, self::IMAGE_QUALITY_DEFAULT);
◆ setImageSize()
static ilPreviewSettings::setImageSize |
( |
|
$a_value | ) |
|
|
static |
Sets the size of the preview images in pixels.
- Parameters
-
Definition at line 122 of file class.ilPreviewSettings.php.
References $instance.
125 $instance->image_size = self::adjustNumeric($a_value, self::IMAGE_SIZE_MIN, self::IMAGE_SIZE_MAX, self::IMAGE_SIZE_DEFAULT);
◆ setMaximumPreviews()
static ilPreviewSettings::setMaximumPreviews |
( |
|
$a_value | ) |
|
|
static |
◆ setPreviewEnabled()
static ilPreviewSettings::setPreviewEnabled |
( |
|
$a_value | ) |
|
|
static |
◆ $image_quality
ilPreviewSettings::$image_quality = self::IMAGE_QUALITY_DEFAULT |
|
private |
◆ $image_size
ilPreviewSettings::$image_size = self::IMAGE_SIZE_DEFAULT |
|
private |
◆ $instance
ilPreviewSettings::$instance = null |
|
staticprivate |
◆ $max_previews
ilPreviewSettings::$max_previews = self::MAX_PREVIEWS_DEFAULT |
|
private |
◆ $preview_enabled
ilPreviewSettings::$preview_enabled = true |
|
private |
◆ $settings
ilPreviewSettings::$settings = null |
|
private |
◆ IMAGE_QUALITY_DEFAULT
const ilPreviewSettings::IMAGE_QUALITY_DEFAULT = 85 |
◆ IMAGE_QUALITY_MAX
const ilPreviewSettings::IMAGE_QUALITY_MAX = 100 |
◆ IMAGE_QUALITY_MIN
const ilPreviewSettings::IMAGE_QUALITY_MIN = 20 |
◆ IMAGE_SIZE_DEFAULT
const ilPreviewSettings::IMAGE_SIZE_DEFAULT = 280 |
◆ IMAGE_SIZE_MAX
const ilPreviewSettings::IMAGE_SIZE_MAX = 600 |
◆ IMAGE_SIZE_MIN
const ilPreviewSettings::IMAGE_SIZE_MIN = 50 |
◆ MAX_PREVIEWS_DEFAULT
const ilPreviewSettings::MAX_PREVIEWS_DEFAULT = 5 |
◆ MAX_PREVIEWS_MAX
const ilPreviewSettings::MAX_PREVIEWS_MAX = 20 |
◆ MAX_PREVIEWS_MIN
const ilPreviewSettings::MAX_PREVIEWS_MIN = 1 |
The documentation for this class was generated from the following file: