Changed names of the template plugin classes
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / template / plugin / FilesizeModifierTemplatePlugin.class.php
CommitLineData
349976a8
MS
1<?php
2namespace wcf\system\template\plugin;
3use wcf\system\template\TemplateEngine;
4use wcf\system\template\IModifierTemplatePlugin;
5use wcf\util\FileUtil;
6
7/**
8 * The 'filesize' modifier formats a filesize (given in bytes).
9 *
10 * Usage:
11 * {$string|filesize}
12 * {123456789|filesize}
13 *
14 * @author Marcel Werk
15 * @copyright 2001-2011 WoltLab GmbH
16 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
17 * @package com.woltlab.wcf
18 * @subpackage system.template.plugin
19 * @category Community Framework
20 */
21class FilesizeModifierTemplatePlugin implements IModifierTemplatePlugin {
22 /**
23 * @see wcf\system\template\IModifierTemplatePlugin::execute()
24 */
25 public function execute($tagArgs, TemplateEngine $tplObj) {
26 return FileUtil::formatFilesize($tagArgs[0]);
27 }
28}