Skip to content
Snippets Groups Projects
Commit 81202b0a authored by Ernesto Baschny's avatar Ernesto Baschny Committed by Stefan Neufeind
Browse files

[BUGFIX] Images in distributions are not shown

The API of the fluid image viewhelper had changed. This makes that
change less breaking, by respecting the old order of parameters,
thus allowing subclasses to continue working as usual.

Also adds some comments in phpdoc for the parameters.

Related: #53700
Resolves: #54411
Releases: 6.2

Change-Id: I11c8ec06ee263a18abd72a12e77a25899f73b475
Reviewed-on: https://review.typo3.org/26407
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Philipp Gampe
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
parent 60e488e3
Branches
Tags
No related merge requests found
......@@ -83,8 +83,7 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedV
* Resizes a given image (if required) and renders the respective img tag
*
* @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4164427
* @param string $src
* @param FileInterface|AbstractFileFolder $image
* @param string $src a path to a file, a combined FAL identifier or an uid (integer). If $treatIdAsReference is set, the integer is considered the uid of the sys_file_reference record. If you already got a FAL object, consider using the $image parameter instead
* @param string $width width of the image. This can be a numeric value representing the fixed width of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
* @param string $height height of the image. This can be a numeric value representing the fixed height of the image in pixels. But you can also perform simple calculations by adding "m" or "c" to the value. See imgResource.width for possible options.
* @param integer $minWidth minimum width of the image
......@@ -92,11 +91,12 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedV
* @param integer $maxWidth maximum width of the image
* @param integer $maxHeight maximum height of the image
* @param boolean $treatIdAsReference given src argument is a sys_file_reference record
* @param FileInterface|AbstractFileFolder $image a FAL object
*
* @throws \TYPO3\CMS\Fluid\Core\ViewHelper\Exception
* @return string Rendered tag
*/
public function render($src = NULL, $image = NULL, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL, $treatIdAsReference = FALSE) {
public function render($src = NULL, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL, $treatIdAsReference = FALSE, $image = NULL) {
if (is_null($src) && is_null($image) || !is_null($src) && !is_null($image)) {
throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('You must either specify a string src or a File object.', 1382284105);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment