Closed pfrenssen closed 7 years ago
Best I can come up with right now is OgRole::loadByGroupTypeGroupBundleAndName()
but this is a bit :unamused:
I did it: https://github.com/amitaibu/og/pull/306 I'm at Drupalaton codesprint.
Unfortunately I can't find better name for it, except if we create a 'magic' function which works like the method overload...
https://github.com/Gizra/og/pull/167 ready for review
We have a convenient static method that allows to retrieve an OgRole by group entity type, bundle and role name:
Og::getRole()
.This method should be moved out of the
Og
class. It belongs inOgRole
, because it is closely related toOgRole::load()
, 'OgRole::loadMultiple()and
OgRole::loadByGroupAndName()`.We should rename it as well, so it starts with
load...()
. Any suggestions for a good name?