![]() |
TYPO3
7.6
|
Protected Attributes | |
$tagName = 'img' | |
$imageService | |
![]() | |
$tag = null | |
$tagName = 'div' | |
![]() | |
$arguments | |
$templateVariableContainer | |
$controllerContext | |
$renderingContext | |
$renderChildrenClosure = null | |
$viewHelperVariableContainer | |
$objectManager | |
$escapingInterceptorEnabled = true | |
Additional Inherited Members | |
![]() | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
![]() | |
registerTagAttribute ($name, $type, $description, $required=false, $default=null) | |
registerUniversalTagAttributes () | |
Resizes a given image (if required) and renders the respective img tag
= Examples =
<f:image src="EXT:myext/Resources/Public/typo3_logo.png" alt="alt text" />
<output>
or (in BE mode):
</output>
<f:image image="{imageObject}" />
<output>
</output>
{f:image(src: 'EXT:viewhelpertest/Resources/Public/typo3_logo.png', alt: 'alt text', minWidth: 30, maxWidth: 40)}
<output>
(depending on your TYPO3s encryption key) </output>
<f:image src="NonExistingImage.png" alt="foo" />
<output> Could not get image resource for "NonExistingImage.png". </output>
Definition at line 57 of file fluid/Classes/ViewHelpers/ImageViewHelper.php.
initializeArguments | ( | ) |
Initialize arguments.
Definition at line 75 of file fluid/Classes/ViewHelpers/ImageViewHelper.php.
References AbstractTagBasedViewHelper\registerTagAttribute(), and AbstractTagBasedViewHelper\registerUniversalTagAttributes().
render | ( | $src = null , |
|
$width = null , |
|||
$height = null , |
|||
$minWidth = null , |
|||
$minHeight = null , |
|||
$maxWidth = null , |
|||
$maxHeight = null , |
|||
$treatIdAsReference = false , |
|||
$image = null , |
|||
$crop = null , |
|||
$absolute = false |
|||
) |
Resizes a given image (if required) and renders the respective img tag
string | $src | a path to a file, a combined FAL identifier or an uid (int). 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 |
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. |
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. |
int | $minWidth | minimum width of the image |
int | $minHeight | minimum height of the image |
int | $maxWidth | maximum width of the image |
int | $maxHeight | maximum height of the image |
bool | $treatIdAsReference | given src argument is a sys_file_reference record |
FileInterface | AbstractFileFolder | $image | a FAL object |
string | bool | $crop | overrule cropping of image (setting to FALSE disables the cropping set in FileReference) |
bool | $absolute | Force absolute URL |
\TYPO3\CMS\Fluid\Core\ViewHelper\Exception |
Definition at line 104 of file fluid/Classes/ViewHelpers/ImageViewHelper.php.
References FileReference\getProperty().
|
protected |
Definition at line 68 of file fluid/Classes/ViewHelpers/ImageViewHelper.php.
|
protected |
Definition at line 62 of file fluid/Classes/ViewHelpers/ImageViewHelper.php.