‪TYPO3CMS  ‪main
RichTextNodeResolver.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
22 
29 {
30  protected array ‪$data;
31 
32  public function ‪setData(array ‪$data): void
33  {
34  $this->data = ‪$data;
35  }
36 
42  public function ‪resolve(): ?string
43  {
44  $parameterArray = $this->data['parameterArray'];
45  if (// If RTE is enabled for field
46  (bool)($parameterArray['fieldConf']['config']['enableRichtext'] ?? false) === true
47  // If RTE config is found (prepared by TcaText data provider)
48  && is_array($parameterArray['fieldConf']['config']['richtextConfiguration'] ?? null)
49  // If RTE is not disabled on configuration level
50  && !($parameterArray['fieldConf']['config']['richtextConfiguration']['disabled'] ?? false)
51  ) {
52  return RichTextElement::class;
53  }
54  return null;
55  }
56 }
‪TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver
Definition: RichTextNodeResolver.php:29
‪TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\$data
‪array $data
Definition: RichTextNodeResolver.php:30
‪TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\setData
‪setData(array $data)
Definition: RichTextNodeResolver.php:32
‪TYPO3\CMS\RteCKEditor\Form\Element\RichTextElement
Definition: RichTextElement.php:38
‪TYPO3\CMS\RteCKEditor\Form\Resolver\RichTextNodeResolver\resolve
‪string null resolve()
Definition: RichTextNodeResolver.php:42
‪TYPO3\CMS\RteCKEditor\Form\Resolver
Definition: RichTextNodeResolver.php:18
‪TYPO3\CMS\Backend\Form\NodeResolverInterface
Definition: NodeResolverInterface.php:22