-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
203 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
declare(strict_types = 1); | ||
namespace B13\Menus\DataProcessing; | ||
|
||
/* | ||
* This file is part of TYPO3 CMS-based extension "menus" by b13. | ||
* | ||
* It is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, either version 2 | ||
* of the License, or any later version. | ||
*/ | ||
|
||
|
||
use TYPO3\CMS\Core\Utility\GeneralUtility; | ||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer; | ||
use TYPO3\CMS\Frontend\ContentObject\DataProcessorInterface; | ||
use TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor; | ||
|
||
/** | ||
* DataProcessor to render a tree-based menu of pages and subpages. | ||
*/ | ||
abstract class AbstractMenu implements DataProcessorInterface | ||
{ | ||
|
||
/** | ||
* @var ContentDataProcessor | ||
*/ | ||
protected $contentDataProcessor; | ||
|
||
/** | ||
* Constructor | ||
*/ | ||
public function __construct() | ||
{ | ||
$this->contentDataProcessor = GeneralUtility::makeInstance(ContentDataProcessor::class); | ||
} | ||
|
||
/** | ||
* Process additional data processors | ||
* | ||
* @param array $page | ||
* @param array $processorConfiguration | ||
* @return array | ||
*/ | ||
protected function processAdditionalDataProcessors(&$page, $processorConfiguration) | ||
{ | ||
if (is_array($page['subpages'])) { | ||
foreach ($page['subpages'] as &$item) { | ||
$this->processAdditionalDataProcessors($item, $processorConfiguration); | ||
} | ||
} | ||
|
||
/** @var ContentObjectRenderer $recordContentObjectRenderer */ | ||
$recordContentObjectRenderer = GeneralUtility::makeInstance(ContentObjectRenderer::class); | ||
$recordContentObjectRenderer->start($page, 'pages'); | ||
$page = $this->contentDataProcessor->process($recordContentObjectRenderer, $processorConfiguration, $page); | ||
return $page; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Migrate TypoScript for Fluid-based solution | ||
------------------------------------------- | ||
|
||
general Menu | ||
|
||
- dataProcessors.10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor | ||
- dataProcessors.10.level = 2 | ||
+ dataProcessors.10 = B13\Menus\DataProcessing\TreeMenu | ||
+ dataProcessors.10.depth = 2 | ||
|
||
special directory | ||
|
||
- dataProcessors.10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor | ||
- dataProcessors.special = directory | ||
- dataProcessors.special.value = 34 | ||
+ dataProcessors.dataProcessors.10 = B13\Menus\DataProcessing\TreeMenu | ||
+ dataProcessors.entryPoints = 34 | ||
|
||
special list | ||
|
||
- dataProcessors.10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor | ||
- dataProcessors.special = list | ||
- dataProcessors.special.value = 34,22 | ||
+ dataProcessors.10 = B13\Menus\DataProcessing\ListMenu | ||
+ dataProcessors.pages = 34,22 | ||
|
||
special language | ||
|
||
- dataProcessors.10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor | ||
- dataProcessors.special = language | ||
+ dataProcessors.10 = B13\Menus\DataProcessing\LanguageMenu | ||
|
||
special breadcrumbs | ||
|
||
- dataProcessors.10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor | ||
- dataProcessors.10.special = rootline | ||
+ dataProcessors.10 = B13\Menus\DataProcessing\BreadcrumbsMenu | ||
|
||
|
||
Migrate Templates for Fluid-based solution | ||
------------------------------------------- | ||
|
||
* menuItem.children -> menuItem.hasSubpages or menuItem.subpages | ||
* menuItem.data -> is dropped, properties direct in menuItem | ||
* menuItem.link -> is dropped, use Page-Link-VH with menuItem.uid | ||
* menuItem.spacer -> menuItem.isSpacer | ||
* menuItem.current -> menuItem.isCurrentPage | ||
* menuItem.active -> menuItem.isInRootLine | ||
* menuItem.title -> menuItem.nav_title | ||
|
||
|
Oops, something went wrong.