I have a dataobject called Parent that is managed in ModelAdmin. I attach multiple of these dataobjects to a custom page type in the CMS called ParentPage. From the ParentPage page type in the CMS, users can attach/select the Parent dataobjects as I've used a CheckboxSetField. All works fine.
In ModelAdmin when I pull up a Parent dataobject, a pages tab is created which displays which ParentPages this dataobject is linked to. It is listed in a complextablefied I believe and allows users to edit/delete and add ParentPages from the Model/Admin interface.
I don't want this ability. I'd rather the users create the pages from the CMS SiteTree and do it that way. So back in ModelAdmin for the Parent object, I'd rather it just list out which pages the dataobject is linked to, without the ability to add/edit them.
Parent.php Relevant Code:
public static $belongs_many_many = array(
'Pages' => 'ParentPage'
ParentPage.php Relevant Code:
public static $many_many = array(
'Parents' => 'Parent'
$map = array();
if($parents = DataObject::get('Parent')) $map = $parents->toDropdownMap();
$fields->addFieldToTab('Root.Content.Parents', new CheckboxSetField('Parents', 'Parents', $map));