Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
TYPO3: [12, 13]
PHP: [ 8.2, 8.3 ]
include:
- TYPO3: 13
php: 8.4
TYPO3: [13, 14]
PHP: [ 8.2, 8.3, 8.4 ]

steps:
- name: Checkout
Expand All @@ -33,15 +30,15 @@ jobs:
path: ~/.composer/cache
key: dependencies-composer-${{ hashFiles('composer.json') }}

- name: Install composer dependencies TYPO3 13
if: matrix.TYPO3 == 13
- name: Install composer dependencies TYPO3 14
if: matrix.TYPO3 == 14
run: |
composer install --no-progress --no-interaction

- name: Install composer dependencies TYPO3 12
if: matrix.TYPO3 == 12
- name: Install composer dependencies TYPO3 13
if: matrix.TYPO3 == 13
run: |
composer require typo3/cms-backend:^12.4 --no-progress --no-interaction --dev -W
composer require typo3/cms-backend:^13.4 --no-progress --no-interaction --dev

- name: Phpstan
run: .Build/bin/phpstan analyze -c Build/phpstan.neon
Expand Down
13 changes: 8 additions & 5 deletions Classes/LinkHandler/PageLinkHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction;
use TYPO3\CMS\Core\Exception\SiteNotFoundException;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconSize;
use TYPO3\CMS\Core\LinkHandling\LinkService;
use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
use TYPO3\CMS\Core\Site\SiteFinder;
Expand Down Expand Up @@ -84,10 +85,12 @@ protected function getRecordsOnExpandedPage($pageId)
$languages = $this->getAllLanguages($pageId);
$availableLanguages = [];
$languageIds = [];
$iconSizeSmall = class_exists(IconSize::class) ? IconSize::SMALL : constant(Icon::class . '::SIZE_SMALL');

foreach ($languages as $language) {
$availableLanguages[$language->getLanguageId()] = [
'title' => $language->getTitle(),
'flag' => $this->iconFactory->getIcon($language->getFlagIdentifier(), Icon::SIZE_SMALL),
'flag' => $this->iconFactory->getIcon($language->getFlagIdentifier(), $iconSizeSmall),
];
if ($language->getLanguageId() > -1) {
$availableLanguages[$language->getLanguageId()]['url'] = $this->linkService->asString([
Expand All @@ -113,7 +116,7 @@ protected function getRecordsOnExpandedPage($pageId)
$this->view->assign('activePageLink', $this->linkService->asString(['type' => LinkService::TYPE_PAGE, 'pageuid' => $pageId]));
}
$this->view->assign('activePageTitle', BackendUtility::getRecordTitle('pages', $activePageRecord, true));
$this->view->assign('activePageIcon', $this->iconFactory->getIconForRecord('pages', $activePageRecord, Icon::SIZE_SMALL)->render());
$this->view->assign('activePageIcon', $this->iconFactory->getIconForRecord('pages', $activePageRecord, $iconSizeSmall)->render());

// Look up tt_content elements from the expanded page
$queryBuilder = $this->connectionPool->getQueryBuilderForTable('tt_content');
Expand Down Expand Up @@ -156,15 +159,15 @@ protected function getRecordsOnExpandedPage($pageId)
$groupedContentElements = [];
$groupedContentElements[-1] = [
'label' => $languages[-1]['title'],
'flag' => $this->iconFactory->getIcon($languages[-1]['flagIcon'], Icon::SIZE_SMALL),
'flag' => $this->iconFactory->getIcon($languages[-1]['flagIcon'], $iconSizeSmall),
'items' => [],
];
foreach ($contentElements as &$contentElement) {
$languageId = (int)$contentElement['sys_language_uid'];
if (!isset($groupedContentElements[$languageId])) {
$groupedContentElements[$languageId] = [
'label' => $languages[$languageId]['title'],
'flag' => $this->iconFactory->getIcon($languages[$languageId]['flagIcon'], Icon::SIZE_SMALL),
'flag' => $this->iconFactory->getIcon($languages[$languageId]['flagIcon'], $iconSizeSmall),
'items' => [],
];
}
Expand All @@ -179,7 +182,7 @@ protected function getRecordsOnExpandedPage($pageId)

$contentElement['url'] = $this->linkService->asString(['type' => LinkService::TYPE_PAGE, 'parameters' => '&L=' . $languageId, 'pageuid' => (int)$pageId, 'fragment' => $contentElement['uid']]);
$contentElement['isSelected'] = !empty($this->linkParts) && (int)($this->linkParts['url']['fragment'] ?? 0) === (int)$contentElement['uid'];
$contentElement['icon'] = $this->iconFactory->getIconForRecord('tt_content', $contentElement, Icon::SIZE_SMALL)->render();
$contentElement['icon'] = $this->iconFactory->getIconForRecord('tt_content', $contentElement, $iconSizeSmall)->render();
$contentElement['title'] = BackendUtility::getRecordTitle('tt_content', $contentElement, true);
$groupedContentElements[$languageId]['items'][$colPos]['items'][] = $contentElement;
if ($languageId === 0) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"Language"
],
"require": {
"typo3/cms-backend": "^12.4 || ^13.4"
"typo3/cms-backend": "^13.4 || ^14.3"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'author_company' => 'b13 GmbH',
'constraints' => [
'depends' => [
'typo3' => '12.4.27-13.99.99',
'typo3' => '13.4.0-14.3.99',
],
],
];
Loading