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,6 +1,7 @@
<% if $Submenu %> <% if $Submenu %>
<nav> <nav>
<ul class="nav flex-column"> <ul class="nav flex-column">
<% if $TopLevelSubmenu %>
<% with $Page.Level(1) %> <% with $Page.Level(1) %>
<li class="nav-item-level1 nav-item {$CSSClass} $ExtraClass"> <li class="nav-item-level1 nav-item {$CSSClass} $ExtraClass">
<b class="nav-link"> <b class="nav-link">
@ -9,6 +10,16 @@
</b> </b>
</li> </li>
<% end_with %> <% 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 %>