I am working on a new module, that I will release at some point in the near future (fingers crossed). I am having one annoying issue though. Basically, if I create my new page type, I want a DropdownField to appear that will list all members that are allowed to edit this page (set via the behaviour tab).
Currently I get all members listed in the dropdown by doing:
if ($member = DataObject::get('Member')) $member = $member->toDropdownMap('ID', 'FirstName', '(Select one)', true); $fields->push(new DropdownField('AssignedToID', 'AssignedTo', $member));
I am guessing I need to add a filter to DataObject::get(), but what?
I could do a for loop on $this->EditorGroups(), but is that te best option?