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
RichTextNodeResolver.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\RteCKEditor\Form\Resolver
;
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\Backend\Form\NodeFactory
;
18
use
TYPO3\CMS\Backend\Form\NodeResolverInterface
;
19
use
TYPO3\CMS\Core\Authentication\BackendUserAuthentication
;
20
use
TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement
;
21
26
class
RichTextNodeResolver
implements
NodeResolverInterface
27
{
33
protected
$data
;
34
41
public
function
__construct
(
NodeFactory
$nodeFactory, array
$data
)
42
{
43
$this->data =
$data
;
44
}
45
51
public
function
resolve
()
52
{
53
$parameterArray = $this->data[
'parameterArray'
];
54
$backendUser = $this->
getBackendUserAuthentication
();
55
if
(
// This field is not read only
56
!$parameterArray[
'fieldConf'
][
'config'
][
'readOnly'
]
57
// If RTE is generally enabled by user settings and RTE object registry can return something valid
58
&& $backendUser->isRTE()
59
// If RTE is enabled for field
60
&& isset($parameterArray[
'fieldConf'
][
'config'
][
'enableRichtext'
])
61
&& (
bool
)$parameterArray[
'fieldConf'
][
'config'
][
'enableRichtext'
] ===
true
62
// If RTE config is found (prepared by TcaText data provider)
63
&& isset($parameterArray[
'fieldConf'
][
'config'
][
'richtextConfiguration'
])
64
&& is_array($parameterArray[
'fieldConf'
][
'config'
][
'richtextConfiguration'
])
65
// If RTE is not disabled on configuration level
66
&& !$parameterArray[
'fieldConf'
][
'config'
][
'richtextConfiguration'
][
'disabled'
]
67
) {
68
return
RichTextElement::class;
69
}
70
return
null
;
71
}
72
76
protected
function
getBackendUserAuthentication
()
77
{
78
return
$GLOBALS
[
'BE_USER'
];
79
}
80
}
TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver
Definition:
RichTextNodeResolver.php:27
TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\$data
array $data
Definition:
RichTextNodeResolver.php:32
TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement
Definition:
RichTextElement.php:30
TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\__construct
__construct(NodeFactory $nodeFactory, array $data)
Definition:
RichTextNodeResolver.php:40
TYPO3\CMS\RteCKEditor\Form\Resolver
Definition:
RichTextNodeResolver.php:2
TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition:
BackendUserAuthentication.php:45
TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\getBackendUserAuthentication
BackendUserAuthentication getBackendUserAuthentication()
Definition:
RichTextNodeResolver.php:75
TYPO3\CMS\Backend\Form\NodeFactory
Definition:
NodeFactory.php:36
TYPO3\CMS\Backend\Form\NodeResolverInterface
Definition:
NodeResolverInterface.php:21
$GLOBALS
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition:
ext_localconf.php:5
TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\resolve
string void resolve()
Definition:
RichTextNodeResolver.php:50
doxygen
typo3
sysext
rte_ckeditor
Classes
Form
Resolver
RichTextNodeResolver.php
Generated on Tue Oct 5 2021 01:57:55 for TYPO3CMS by
1.8.18