Skip to content

Commit

Permalink
FIX: use PageDoktypeRegistry for registering new doktypes
Browse files Browse the repository at this point in the history
  • Loading branch information
theDex committed Oct 2, 2023
1 parent aa926a9 commit 61b0d50
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/Loader/DoktypeLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use PunktDe\Typo3YamlLoader\Validator\DoktypeValidator;
use PunktDe\Typo3YamlLoader\Validator\PaletteValidator;
use Symfony\Component\Yaml\Yaml;
use TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
use TYPO3\CMS\Core\SingletonInterface;
use TYPO3\CMS\Core\Utility\ArrayUtility;
Expand Down Expand Up @@ -117,11 +118,15 @@ public function loadPageTypes(): void
foreach ($this->doktypeConfigurations as $identifier => $configuration) {

$doktype = $configuration['backendLayout']['doktype'];

$GLOBALS['PAGES_TYPES'][$doktype] = [
$configuration = [
'type' => 'web',
'allowedTables' => '*',
];

// TODO: not sure if this is still used in TYPO3 12
$GLOBALS['PAGES_TYPES'][$doktype] = $configuration;

GeneralUtility::makeInstance(PageDoktypeRegistry::class)->add($doktype, $configuration);
}
}

Expand Down

0 comments on commit 61b0d50

Please sign in to comment.