Fixed issue: #10817 DAU WS-Module warning
[Packages/TYPO3.CMS.git] / typo3 / sysext / workspaces / Classes / ViewHelpers / TempFlashMessageQueueViewHelper.php
1 <?php
2 /* *
3 * This script belongs to the FLOW3 package "Fluid". *
4 * *
5 * It is free software; you can redistribute it and/or modify it under *
6 * the terms of the GNU Lesser General Public License as published by the *
7 * Free Software Foundation, either version 3 of the License, or (at your *
8 * option) any later version. *
9 * *
10 * This script is distributed in the hope that it will be useful, but *
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
12 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser *
13 * General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU Lesser General Public *
16 * License along with the script. *
17 * If not, see http://www.gnu.org/licenses/lgpl.html *
18 * *
19 * The TYPO3 project - inspiring people to share! *
20 * */
21
22 /**
23 * View helper which renders the FlashMessageQueu
24 *
25 * = Examples =
26 *
27 * <code title="Minimal">
28 * <f:be.flashMessageQueue />
29 * </code>
30 *
31 * Output:
32 * All FlashMessages which were registered using t3lib_FlashMessageQueue::addMessage($message);
33 *
34 * @author Tolleiv Nietsch <info@tolleiv.de>
35 * @license http://www.gnu.org/copyleft/gpl.html
36 * @version SVN: $Id:
37 *
38 */
39
40 /**
41 * ViewHelper to integrate the backend FlashMessageQueue into our module
42 *
43 * @todo Remove this viewHelper once http://forge.typo3.org/issues/10821 is available
44 */
45 class Tx_Workspaces_ViewHelpers_TempFlashMessageQueueViewHelper extends Tx_Fluid_ViewHelpers_Be_AbstractBackendViewHelper {
46
47
48 /**
49 * Renders a shortcut button as known from the TYPO3 backend
50 *
51 * @return string the rendered flashMessage
52 * @see template::makeShortcutIcon()
53 */
54 public function render() {
55
56 $renderedMessages = '';
57 $flashMessages = t3lib_FlashMessageQueue::renderFlashMessages();
58 if (!empty($flashMessages)) {
59 $renderedMessages = '<div id="typo3-messages">' . $flashMessages . '</div>';
60 }
61
62 return $renderedMessages;
63 }
64 }
65 ?>