Skip to content

Commit 09c9f2d

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

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ 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+
214+
209215
public function getColPosName(string $cType, int $colPos): ?string
210216
{
211217
$grid = $this->getGrid($cType);

0 commit comments

Comments
 (0)