Skip to content

Commit

Permalink
fix wrong import
Browse files Browse the repository at this point in the history
  • Loading branch information
colorcube committed Oct 9, 2019
1 parent 4bd8361 commit 9b56a05
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
38 changes: 38 additions & 0 deletions Classes/Service/FrontendControllerService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);

namespace Colorcube\Auto404\Service;

use TYPO3\CMS\Core\TypoScript\TemplateService;
use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
use TYPO3\CMS\Frontend\Page\PageRepository;

abstract class FrontendControllerService
{

/**
* @return PageRepository
*/
public static function getPageRepository(): PageRepository
{
return self::getController()->sys_page;
}

/**
* @return TemplateService
*/
public static function getTemplateService(): TemplateService
{
return self::getController()->tmpl;
}

/**
* @return TypoScriptFrontendController
*/
public static function getController(): TypoScriptFrontendController
{
return $GLOBALS['TSFE'];
}


}
3 changes: 0 additions & 3 deletions Classes/Service/PageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
namespace Colorcube\Auto404\Service;


use Colorcube\SimulateStaticUrls\Service\FrontendControllerService;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\DebuggerUtility;
use TYPO3\CMS\Frontend\Page\PageRepository;

abstract class PageService
Expand Down Expand Up @@ -41,7 +39,6 @@ public static function getPageByAliasWithOverlay(string $alias, int $rootPageUid

if ($pageRecord && $languageUid > 0) {
$pageRecord = FrontendControllerService::getPageRepository()->getPageOverlay($pageRecord, $languageUid);

}

return $pageRecord;
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
'author' => 'René Fritz',
'author_email' => 'r.fritz@colorcube.de',
'author_company' => 'Colorcube',
'version' => '1.1.0',
'version' => '1.1.1',
'state' => 'stable',
'constraints' => [
'depends' => [
Expand Down

0 comments on commit 9b56a05

Please sign in to comment.