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) public function __construct($itemsPerPage = null)
{ {
parent::__construct(); parent::__construct($itemsPerPage);
$this->removeComponentsByType([ $this->removeComponentsByType([
GridField_ActionMenu::class, GridField_ActionMenu::class,

View File

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

View File

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