[BUGFIX] Catch InvalidPackageManifestException in PackageManager
[Packages/TYPO3.CMS.git] / typo3 / sysext / about / Classes / ViewHelpers / SkinImageViewHelper.php
1 <?php
2 namespace TYPO3\CMS\About\ViewHelpers;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 /**
18 * Render images that can be registered in the TYPO3 backend skinning API
19 * Extends the default image view helper from fluid
20 *
21 * This view helper is a helper for ext:about only and should
22 * not be used outside of the extension for now.
23 * See the fluid templates of ext:about for a usage example.
24 *
25 * @internal
26 */
27 class SkinImageViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper {
28
29 /**
30 * Resizes a given image (if required) and renders the respective img tag
31 *
32 * @see http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/5/#id4164427
33 * @param string $src
34 * @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.
35 * @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.
36 * @param int $minWidth minimum width of the image
37 * @param int $minHeight minimum height of the image
38 * @param int $maxWidth maximum width of the image
39 * @param int $maxHeight maximum height of the image
40 * @return string rendered tag.
41 */
42 public function render($src, $width = NULL, $height = NULL, $minWidth = NULL, $minHeight = NULL, $maxWidth = NULL, $maxHeight = NULL) {
43 $src = \TYPO3\CMS\Backend\Utility\IconUtility::skinImg('../typo3/', $src, '', 1);
44 return parent::render('' . $src, $width, $height . $minWidth, $minHeight, $maxWidth, $maxHeight);
45 }
46
47 }