Skip to content
Snippets Groups Projects
Commit e0c23d46 authored by Wouter Wolters's avatar Wouter Wolters Committed by Markus Klein
Browse files

[TASK] Drop usage of SkinImageViewHelper in ext:about

Resolves: #68139
Releases: master
Change-Id: I468fc51a9221261b7fc2dfa02701efa4dbaf0892
Reviewed-on: http://review.typo3.org/41235


Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent b6aeeb9e
Branches
Tags
No related merge requests found
<?php
namespace TYPO3\CMS\About\ViewHelpers;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
/**
* Render images that can be registered in the TYPO3 backend skinning API
* Extends the default image view helper from fluid
*
* This view helper is a helper for ext:about only and should
* not be used outside of the extension for now.
* See the fluid templates of ext:about for a usage example.
*
* @internal
*/
class SkinImageViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper {
/**
* 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 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 int $minWidth minimum width of the image
* @param int $minHeight minimum height of the image
* @param int $maxWidth maximum width of the image
* @param int $maxHeight maximum height of the image
* @return string rendered tag.
*/
public function render($src, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL) {
$src = \TYPO3\CMS\Backend\Utility\IconUtility::skinImg('../typo3/', $src, '', 1);
return parent::render('' . $src, $width, $height . $minWidth, $minHeight, $maxWidth, $maxHeight);
}
}
{namespace about=TYPO3\CMS\About\ViewHelpers}
<about:SkinImage
src="sysext/backend/Resources/Public/Images/typo3-transparent@2x.png"
width="150"
alt="{f:translate(key:'LLL:EXT:lang/locallang_mod_help_about.xlf:typo3_logo')}"
/>
<br><br>
<img src="sysext/backend/Resources/Public/Images/typo3-transparent@2x.png" width="150"
alt="{f:translate(key:'LLL:EXT:lang/locallang_mod_help_about.xlf:typo3_logo')}" />
<br><br>
\ No newline at end of file
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