1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
PreviewImageOptions.php
См. документацию.
1<?php
2
3namespace Bitrix\UI\FileUploader;
4
5use Bitrix\Main\File\Image;
6
8{
9 protected int $width = 300;
10 protected int $height = 300;
11 protected int $mode = Image::RESIZE_PROPORTIONAL;
12
13 public function __construct(array $options = [])
14 {
15 $optionNames = [
16 'width',
17 'height',
18 'mode',
19 ];
20
21 foreach ($optionNames as $optionName)
22 {
23 if (array_key_exists($optionName, $options))
24 {
26 $setter = 'set' . ucfirst($optionName);
27 $this->$setter($optionValue);
28 }
29 }
30 }
31
32 public function getWidth(): int
33 {
34 return $this->width;
35 }
36
37 public function setWidth(int $width): self
38 {
39 $this->width = $width;
40
41 return $this;
42 }
43
44 public function getHeight(): int
45 {
46 return $this->height;
47 }
48
49 public function setHeight(int $height): self
50 {
51 $this->height = $height;
52
53 return $this;
54 }
55
56 public function getMode(): int
57 {
58 return $this->mode;
59 }
60
61 public function setMode(int $mode): self
62 {
63 $this->mode = $mode;
64
65 return $this;
66 }
67}
$options
Определения commerceml2.php:49
hidden PROPERTY[<?=$propertyIndex?>][CODE]<?=htmlspecialcharsEx( $propertyCode)?> height
Определения file_new.php:759
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
Определения file_new.php:677
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$optionName
Определения options.php:1735
$optionValue
Определения options.php:3512