Skip to content

Commit 0bdc94c

Browse files
committed
[FEATURE] use container label in TCA select field
Fixes: #667
1 parent b16163a commit 0bdc94c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Classes/Tca/ItemProcFunc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function txContainerParent(array &$parameters): void
8585
$container = $this->containerFactory->buildContainer((int)$row['tx_container_parent']);
8686
$cType = $container->getCType();
8787
$items[] = [
88-
$cType,
88+
$this->tcaRegistry->getContainerLabel($cType),
8989
$row['tx_container_parent'],
9090
];
9191
} catch (Exception $e) {

Classes/Tca/Registry.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,11 @@ public function getGridLayoutPaths(string $cType): array
206206
return $GLOBALS['TCA']['tt_content']['containerConfiguration'][$cType]['gridLayoutPaths'] ?? [];
207207
}
208208

209+
public function getContainerLabel(string $cType): string
210+
{
211+
return $GLOBALS['TCA']['tt_content']['containerConfiguration'][$cType]['label'] ?? $cType;
212+
}
213+
209214
public function getColPosName(string $cType, int $colPos): ?string
210215
{
211216
$grid = $this->getGrid($cType);

Tests/Acceptance/Backend/LayoutCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public function newElementInHeaderColumnHasExpectedColPosAndParentSelected(Backe
284284
}
285285
$I->switchToContentFrame();
286286
$I->see('header [200]');
287-
$I->see('b13-2cols-with-header-container [700]');
287+
$I->see('2 Column Container With Header [700]');
288288
}
289289

290290
/**

0 commit comments

Comments
 (0)