[BUGFIX] Folders created from BE fail to set permissions
[Packages/TYPO3.CMS.git] / typo3 / sysext / lang / Classes / ViewHelpers / Be / SpriteIconViewHelper.php
1 <?php
2 namespace TYPO3\CMS\Lang\ViewHelpers\Be;
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 * Sprite icon view helper
19 *
20 * Usage:
21 *
22 * {namespace myext=ENET\MyExt\ViewHelpers}
23 * <myext:be.spriteIcon icon="actions-document-close" title="Close" class="myClass" />
24 *
25 * @author Kai Vogel <kai.vogel@speedprogs.de>
26 * @internal
27 */
28 class SpriteIconViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper {
29
30 /**
31 * Renders an icon as known from the TYPO3 backend
32 *
33 * @param string $icon Icon to be used
34 * @param string $title Title attribute
35 * @param string $class Class attribute
36 * @return string the rendered icon
37 */
38 public function render($icon, $title = '', $class = '') {
39 $options = array(
40 'title' => $title,
41 'class' => $class,
42 );
43 return \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($icon, $options);
44 }
45
46 }