Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Use page layout specific column labels #1919

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions Classes/Form/Container/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function buildExtendedBackendLayoutArray(int $parentRecordUid): array
* @param int $parentRecordUid
* @return BackendLayout
*/
public function buildBackendLayout(int $parentRecordUid): BackendLayout
public function buildBackendLayout(int $parentRecordUid): ?BackendLayout
{
$configuration = $this->buildBackendLayoutArray($parentRecordUid);
$configuration = $this->ensureDottedKeys($configuration);
Expand All @@ -153,9 +153,12 @@ public function buildBackendLayout(int $parentRecordUid): BackendLayout
foreach ($this->flattenSetup($configuration, 'backend_layout.') as $name => $value) {
$typoScriptString .= $name . ' = ' . $value . LF;
}
if ($root->getName() === null) {
return null;
}
return new BackendLayout(
$this->getRoot()->getName(),
LocalizationUtility::translate($label)
LocalizationUtility::translate($label, $root->getExtensionName())
? $label
: 'LLL:EXT:flux/Resources/Private/Language/locallang.xlf:flux.grid.grids.grid',
$typoScriptString
Expand Down
4 changes: 4 additions & 0 deletions Classes/Provider/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,15 @@ public function getGrid(array $row)
$gridColumn->setColSpan($object['colspan'] ?? 1);
}
}
$grid->setParent($form);
return $grid;
}
}
$grid = $this->grid ?? $this->extractConfiguration($row, 'grids')['grid'] ?? Grid::create();
$grid->setExtensionName($grid->getExtensionName() ?: $this->getControllerExtensionKeyFromRecord($row));
if ($form) {
$grid->setParent($form);
}
return $grid;
}

Expand Down