diff --git a/src/MadeYourDay/Contao/Element/CustomElement.php b/src/MadeYourDay/Contao/Element/CustomElement.php index eb4e0b6..08e2f3a 100644 --- a/src/MadeYourDay/Contao/Element/CustomElement.php +++ b/src/MadeYourDay/Contao/Element/CustomElement.php @@ -136,11 +136,12 @@ protected function deserializeDataRecursive($data) /** * Get an image object from id/uuid and an optional size configuration * - * @param int|string $id ID, UUID string or binary - * @param string|array $size [width, height, mode] optionally serialized - * @return object Image object (similar as addImageToTemplate) + * @param int|string $id ID, UUID string or binary + * @param string|array $size [width, height, mode] optionally serialized + * @param int $maxSize Gets passed to addImageToTemplate + * @return object Image object (similar as addImageToTemplate) */ - public function getImageObject($id, $size = null) + public function getImageObject($id, $size = null, $maxSize = null) { global $objPage; @@ -190,7 +191,7 @@ public function getImageObject($id, $size = null) ); $imageObject = new \stdClass(); - $this->addImageToTemplate($imageObject, $image); + $this->addImageToTemplate($imageObject, $image, $maxSize); return $imageObject; }