mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Use create() to instantiate Member_GroupSet on Member::Groups()
Keeps it consistent with how HasManyList and ManyManyList are instantiated in DataObject.
This commit is contained in:
parent
e2553fa864
commit
abad856534
@ -988,7 +988,7 @@ class Member extends DataObject implements TemplateGlobalProvider {
|
||||
* @todo Push all this logic into Member_GroupSet's getIterator()?
|
||||
*/
|
||||
public function Groups() {
|
||||
$groups = Injector::inst()->create('Member_GroupSet', 'Group', 'Group_Members', 'GroupID', 'MemberID');
|
||||
$groups = Member_GroupSet::create('Group', 'Group_Members', 'GroupID', 'MemberID');
|
||||
$groups = $groups->forForeignID($this->ID);
|
||||
|
||||
$this->extend('updateGroups', $groups);
|
||||
|
Loading…
x
Reference in New Issue
Block a user