1 | <?php |
||
23 | class ImageSetOptions extends AbstractOptions |
||
24 | { |
||
25 | |||
26 | /** |
||
27 | * Entity class for images. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $entityClass = Image::class; |
||
32 | |||
33 | /** |
||
34 | * Name of the form element. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $formElementName = ImageSetInterface::ORIGINAL; |
||
39 | |||
40 | /** |
||
41 | * Image specifications. |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | protected $images = [ |
||
46 | ImageSetInterface::THUMBNAIL => [100,100], |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * @param string $entityClass |
||
51 | * |
||
52 | * @return self |
||
53 | */ |
||
54 | public function setEntityClass($entityClass) |
||
60 | |||
61 | /** |
||
62 | * @return string |
||
63 | */ |
||
64 | public function getEntityClass() |
||
68 | |||
69 | /** |
||
70 | * @return \Core\Entity\ImageInterface |
||
71 | */ |
||
72 | public function getEntity() |
||
78 | |||
79 | /** |
||
80 | * @param string $formElementName |
||
81 | * |
||
82 | * @return self |
||
83 | */ |
||
84 | public function setFormElementName($formElementName) |
||
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | public function getFormElementName() |
||
98 | |||
99 | /** |
||
100 | * Set image specifications. |
||
101 | * |
||
102 | * <pre> |
||
103 | * [ |
||
104 | * <imageKey> => [<maxWidth>,<maxHeight>], |
||
105 | * ] |
||
106 | * </pre> |
||
107 | * |
||
108 | * @param array $images |
||
109 | * |
||
110 | * @return self |
||
111 | */ |
||
112 | public function setImages($images) |
||
118 | |||
119 | /** |
||
120 | * @return array |
||
121 | */ |
||
122 | public function getImages() |
||
126 | } |