Skip to content

Commit a7d337f

Browse files
authored
[TASK] Add TYPO3\CMS\Core\Attribute\AsAllowedCallable attribute (#694)
1 parent 7daa4e4 commit a7d337f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Classes/Core/Functional/Framework/Frontend/Collector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
1919

2020
use Psr\Http\Message\ServerRequestInterface;
21+
use TYPO3\CMS\Core\Attribute\AsAllowedCallable;
2122
use TYPO3\CMS\Core\Resource\File;
2223
use TYPO3\CMS\Core\Resource\FileReference;
2324
use TYPO3\CMS\Core\SingletonInterface;
@@ -41,6 +42,7 @@ public function setContentObjectRenderer(ContentObjectRenderer $cObj): void
4142
$this->cObj = $cObj;
4243
}
4344

45+
#[AsAllowedCallable]
4446
public function addRecordData($content, array $configuration, ServerRequestInterface $request): void
4547
{
4648
$recordIdentifier = $this->cObj->currentRecord;
@@ -60,6 +62,7 @@ public function addRecordData($content, array $configuration, ServerRequestInter
6062
}
6163
}
6264

65+
#[AsAllowedCallable]
6366
public function addFileData($content, array $configuration, ServerRequestInterface $request): void
6467
{
6568
$currentFile = $this->cObj->getCurrentFile();
@@ -81,6 +84,7 @@ public function addFileData($content, array $configuration, ServerRequestInterfa
8184
$this->addToStructure($levelIdentifier, $recordIdentifier, $recordData);
8285
}
8386

87+
#[AsAllowedCallable]
8488
public function attachSection(string $content, ?array $configuration = null): void
8589
{
8690
$section = [

Classes/Core/Functional/Framework/Frontend/Renderer.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* The TYPO3 project - inspiring people to share!
1818
*/
1919

20+
use TYPO3\CMS\Core\Attribute\AsAllowedCallable;
2021
use TYPO3\CMS\Core\SingletonInterface;
2122
use TYPO3\CMS\Core\Utility\GeneralUtility;
2223
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
@@ -29,6 +30,7 @@ final class Renderer implements SingletonInterface
2930
private array $sections = [];
3031
private ContentObjectRenderer $cObj;
3132

33+
#[AsAllowedCallable]
3234
public function parseValues(string $content, ?array $configuration = null): void
3335
{
3436
if (empty($content)) {
@@ -65,6 +67,7 @@ public function parseValues(string $content, ?array $configuration = null): void
6567
* as = CustomData
6668
* }
6769
*/
70+
#[AsAllowedCallable]
6871
public function renderValues(string $content, ?array $configuration = null): void
6972
{
7073
if (empty($configuration['values.'])) {
@@ -83,6 +86,7 @@ public function addSection(array $section, ?string $as = null): void
8386
}
8487
}
8588

89+
#[AsAllowedCallable]
8690
public function renderSections(): string
8791
{
8892
return json_encode($this->sections);

0 commit comments

Comments
 (0)