does anyone know if this module can work with Model admin.
works if i attach it to on Page class in cms fields
eg:
// Create a default configuration for the new GridField, allowing record editing
$config = GridFieldConfig_RelationEditor::create();
$config->addComponent(new GridFieldSortableRows('SortOrder'));
$config->addComponent(new GridFieldBulkEditingTools());
//$config->addComponent(new GridFieldBulkImageUpload());
// Create a gridfield to hold the student relationship
$columnField = new GridField(
'Banners', // Field name
'Banner', // Field title
Banner::get()->sort("SortOrder"), // List of all related students
$config
);
// Create a tab named "Students" and add our field to it
$fields->addFieldToTab('Root.Banners', $columnField);
but if i wanted it in model admin
eg BannerAdmin
class BannerAdmin extends ModelAdmin {
public static $managed_models = array(
'Banner',
);
static $url_segment = 'Banners'; // will be linked as /admin/products
static $menu_title = 'Banners';
}