IMPR: Pass params to parent class

This commit is contained in:
Tony Air 2024-07-19 12:41:13 +02:00
parent 678bf9a43a
commit ada36aaab8
3 changed files with 21 additions and 10 deletions

View File

@ -10,7 +10,7 @@ class GridFieldConfig_RecordEditor extends GridFieldGridFieldConfig_RecordEditor
{
public function __construct($itemsPerPage = null)
{
parent::__construct();
parent::__construct($itemsPerPage);
$this->removeComponentsByType([
GridField_ActionMenu::class,

View File

@ -10,7 +10,7 @@ class GridFieldConfig_RelationEditor extends GridFieldGridFieldConfig_RelationEd
{
public function __construct($itemsPerPage = null, $showPagination = null, $showAdd = null)
{
parent::__construct();
parent::__construct($itemsPerPage, $showPagination, $showAdd);
$this->removeComponentsByType([
GridField_ActionMenu::class,

View File

@ -1,14 +1,25 @@
<% if $Submenu %>
<nav>
<ul class="nav flex-column">
<% with $Page.Level(1) %>
<li class="nav-item-level1 nav-item {$CSSClass} $ExtraClass">
<b class="nav-link">
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="visually-hidden">(current)</i><% end_if %>
</b>
</li>
<% end_with %>
<% if $TopLevelSubmenu %>
<% with $Page.Level(1) %>
<li class="nav-item-level1 nav-item {$CSSClass} $ExtraClass">
<b class="nav-link">
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="visually-hidden">(current)</i><% end_if %>
</b>
</li>
<% end_with %>
<% else %>
<% with $Page %>
<li class="nav-item-level1 nav-item {$CSSClass} $ExtraClass">
<b class="nav-link">
$MenuTitle.XML
<% if $isCurrent || $isSection %><i class="visually-hidden">(current)</i><% end_if %>
</b>
</li>
<% end_with %>
<% end_if %>
<% loop $Submenu %>
<% include NavItem %>