amitaibu / og

A fork to work on OG8
https://github.com/Gizra/og
29 stars 16 forks source link

Add MembershipManagerInterface #297

Closed amitaibu closed 8 years ago

amitaibu commented 8 years ago

296

amitaibu commented 8 years ago

Update: I have created the manager, and kept only the most used proxy methods in \Drupal\og\Og. Next is working on the tests.

amitaibu commented 8 years ago

Most tests fixed - we are now down to the last two unit tests methods

amitaibu commented 8 years ago

I believe tests should return green now..

amitaibu commented 8 years ago

Cool, tests are green. I'll just rename class to MembershipManager and it should be good to go.

amitaibu commented 8 years ago

Ready for review.

PR mostly moves methods to a new service, and keeps only a few methods in \Drupal\og\Og. Also since we have this new service, the ::setup for unit tests for ::userAccess have been cleaned up a bit

amitaibu commented 8 years ago

I prefer to get things in, so it will unblock other PRs. We can always revisit later.

/cc @pfrenssen @RoySegall

RoySegall commented 8 years ago

Looks good to me except for this

/** @var \Drupal\og\MembershipManagerInterface $membership_manager */
$membership_manager = \Drupal::service('og.membership_manager');

This part appear multiple times and I think, IMO, we can convert it to:

$membership_manager = Og::membershipManager();