Latest 4.4.4
Updating site from 3 to above. bottom menu update.
$fields->addFieldToTab(‘Root.Main’, new CheckboxField(‘ShowInTabMenu’, ‘Page shows in middle menu blocks’));
function topTabbers() {
$whereStatement = ‘ShowInTabMenu = 1 AND ShowInMenus = 1’;
return DataObject::get(‘Page’, $whereStatement, ‘SortMenu ASC’);
}
In SS3 I used the code to add certain pages to this 2nd menu with check box in CMS but in 4 this error comes up.
[Emergency] Uncaught Error: Class ‘DataObject’ not found
Any idea what needs to be done.