Skip to content

Commit

Permalink
[BUGFIX] Use page layout specific column labels
Browse files Browse the repository at this point in the history
Labels of columns in page layouts were only translatable with the generic
non-specific key "flux.grid.columns.$columnName".

This patch sets the page layout's grid parent object to be the page layout's form,
so that the resolved parent ID is that of the form.

A column named "one" within a page layout with id "twocol" will thus get
the label key "flux.twocol.columns.one", just as it was for flux 8.

Resolves: #1468
  • Loading branch information
cweiske committed Jan 25, 2022
1 parent 3cc5047 commit 5a6c782
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit 5a6c782

Please sign in to comment.