Skip to content

Commit

Permalink
[BUGFIX] Ensure setup creates site configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminkott committed Mar 19, 2020
1 parent c56e1c4 commit c7a5809
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Classes/Hooks/CreateSiteConfigurationHook.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
declare(strict_types = 1);

/*
* This file is part of the package t3g/blog.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/

namespace T3G\AgencyPack\Blog\Hooks;

use T3G\AgencyPack\Blog\Constants;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
use TYPO3\CMS\Core\Hooks\CreateSiteConfiguration as CoreCreateSiteConfiguration;

class CreateSiteConfigurationHook extends CoreCreateSiteConfiguration
{
protected $allowedPageTypes = [
PageRepository::DOKTYPE_DEFAULT,
PageRepository::DOKTYPE_LINK,
PageRepository::DOKTYPE_SHORTCUT,
Constants::DOKTYPE_BLOG_PAGE
];
}
6 changes: 6 additions & 0 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@
= \T3G\AgencyPack\Blog\Hooks\PageLayoutHeaderHook::class . '->drawHeader';
}

/***************
* Overwrite create site configuration hook to include blog pages
*/
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][\TYPO3\CMS\Core\Hooks\CreateSiteConfiguration::class]
= \T3G\AgencyPack\Blog\Hooks\CreateSiteConfigurationHook::class;

call_user_func(function () {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'T3G.AgencyPack.Blog',
Expand Down

0 comments on commit c7a5809

Please sign in to comment.