Skip to content

Commit

Permalink
Added parameter $maxSize to getImageObject()
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Mar 31, 2014
1 parent cd6ba42 commit 73a2f30
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/MadeYourDay/Contao/Element/CustomElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -190,7 +191,7 @@ public function getImageObject($id, $size = null)
);

$imageObject = new \stdClass();
$this->addImageToTemplate($imageObject, $image);
$this->addImageToTemplate($imageObject, $image, $maxSize);
return $imageObject;
}

Expand Down

0 comments on commit 73a2f30

Please sign in to comment.