Hello,
I created a group for "Students", and I want to have a ModelAdmin section that lists only members from group "Students". Using the following code lists all site members:
class StudentsAdmin extends ModelAdmin {
public static $managed_models = array('Member');
static $url_segment = 'Students';
static $menu_title = 'Students';
public function getList() {
$list = parent::getList();
// ...
return $list;
}
}
I'm trying to use the getList() function to exclude all groups except Students group, something like:
$list->exclude('Group', 'Admins');
any help how I can do this?
Thanks