Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/Model/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,21 @@
*/
class Menu extends DataObject implements TemplateGlobalProvider
{
/** @config */
private static string $table_name = 'Menustructure_Menu';

/** @config */
private static array $db = [
'Title' => 'Varchar',
'Slug' => 'Varchar',
];

/** @config */
private static array $has_many = [
'Items' => MenuItem::class,
];

/** @config */
private static array $cascade_deletes = [
'Items',
];

/** @config */
private static array $summary_fields = [
'Title',
'Slug',
Expand Down
9 changes: 0 additions & 9 deletions src/Model/MenuItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@
*/
class MenuItem extends DataObject
{
/** @config */
private static string $table_name = 'Menustructure_MenuItem';

/** @config */
private static array $db = [
'Title' => 'Varchar',
'LinkType' => "Enum('page,url,file,no-link,breakpoint', 'no-link')",
Expand All @@ -50,38 +48,31 @@ class MenuItem extends DataObject
'QueryString' => 'Varchar',
];

/** @config */
private static array $has_one = [
'File' => File::class,
'Menu' => Menu::class,
'ParentItem' => MenuItem::class,
'LinkedPage' => SiteTree::class,
];

/** @config */
private static array $has_many = [
'Items' => MenuItem::class,
];

/** @config */
private static array $cascade_deletes = [
'Items',
];

/** @config */
private static array $summary_fields = [
'Title',
'LinkType',
'OpenInNewWindow',
];

/** @config */
private static string $default_sort = 'Sort';

/** @config */
private static bool $enable_page_anchor = false;

/** @config */
private static bool $enable_query_string = false;

#[Override]
Expand Down
Loading