From 73a2f306af17e3eb502edf35a75e085c6880dfba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Auswo=CC=88ger?= Date: Mon, 31 Mar 2014 11:01:18 +0200 Subject: [PATCH] Added parameter `$maxSize` to `getImageObject()` --- src/MadeYourDay/Contao/Element/CustomElement.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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; }