TYPO3CMS
9.5
Main Page
Related Pages
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Files
File List
File Members
All
$
d
e
r
u
Functions
Variables
$
e
r
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
TriggerViewHelper.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Extensionmanager\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
use
TYPO3\CMS\Extensionmanager\Controller\AbstractController
;
18
34
class
TriggerViewHelper
extends
\TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
35
{
39
public
function
initializeArguments
()
40
{
41
parent::initializeArguments();
42
$this->registerArgument(
'triggers'
,
'array'
,
'Defined triggers to be forwarded to client (e.g. refreshing backend widgets)'
,
false
, []);
43
}
44
53
public
function
render
()
54
{
55
$pageRenderer = $this->
getPageRenderer
();
56
// Handle triggers
57
if
(!empty($this->arguments[
'triggers'
][
AbstractController::TRIGGER_RefreshModuleMenu
])) {
58
$pageRenderer->addJsInlineCode(
59
AbstractController::TRIGGER_RefreshModuleMenu
,
60
'if (top && top.TYPO3.ModuleMenu.App) { top.TYPO3.ModuleMenu.App.refreshMenu(); }'
61
);
62
}
63
64
if
(!empty($this->arguments[
'triggers'
][
AbstractController::TRIGGER_RefreshTopbar
])) {
65
$pageRenderer->addJsInlineCode(
66
AbstractController::TRIGGER_RefreshTopbar
,
67
'if (top && top.TYPO3.Backend && top.TYPO3.Backend.Topbar) { top.TYPO3.Backend.Topbar.refresh(); }'
68
);
69
}
70
return
''
;
71
}
72
}
TYPO3\CMS\Extensionmanager\ViewHelpers\Be\TriggerViewHelper\initializeArguments
initializeArguments()
Definition:
TriggerViewHelper.php:39
TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper\getPageRenderer
PageRenderer getPageRenderer()
Definition:
AbstractBackendViewHelper.php:54
TYPO3\CMS\Extensionmanager\ViewHelpers\Be\TriggerViewHelper\render
string render()
Definition:
TriggerViewHelper.php:53
TYPO3\CMS\Extensionmanager\ViewHelpers\Be
Definition:
TriggerViewHelper.php:2
TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
Definition:
AbstractBackendViewHelper.php:27
TYPO3\CMS\Extensionmanager\ViewHelpers\Be\TriggerViewHelper
Definition:
TriggerViewHelper.php:35
TYPO3\CMS\Extensionmanager\Controller\AbstractController\TRIGGER_RefreshModuleMenu
const TRIGGER_RefreshModuleMenu
Definition:
AbstractController.php:23
TYPO3\CMS\Extensionmanager\Controller\AbstractController\TRIGGER_RefreshTopbar
const TRIGGER_RefreshTopbar
Definition:
AbstractController.php:25
TYPO3\CMS\Extensionmanager\Controller\AbstractController
Definition:
AbstractController.php:22
doxygen
typo3
sysext
extensionmanager
Classes
ViewHelpers
Be
TriggerViewHelper.php
Generated on Tue Oct 5 2021 01:57:35 for TYPO3CMS by
1.8.18