Skip to content

Commit

Permalink
add cascade_duplicates to relations
Browse files Browse the repository at this point in the history
  • Loading branch information
xini committed Mar 23, 2021
1 parent 24b4e3d commit 6c5b67b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Extensions/MenuSetParentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class MenuSetParentExtension extends DataExtension
'MenuSets'
];

private static $cascade_duplicates = [
'MenuSets'
];

public function updateCMSFields(FieldList $fields)
{
$fields->removeByName('MenuSets');
Expand Down
4 changes: 4 additions & 0 deletions src/Model/MenuItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class MenuItem extends SuperLink
'Children'
];

private static $cascade_duplicates = [
'Children'
];

private static $field_labels = [
'SubmenuMode' => 'Submenu',
'SubmenuSiteTree' => 'Select Page'
Expand Down
4 changes: 4 additions & 0 deletions src/Model/MenuSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ class MenuSet extends DataObject
'Items'
];

private static $cascade_duplicates = [
'Items'
];

private static $defaults = [
'IsTitleEnabled' => false,
'IsHighlightEnabled' => false,
Expand Down

0 comments on commit 6c5b67b

Please sign in to comment.