Loading src/Controller/GroupMembershipRequestController.php +11 −10 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Drupal\Core\Session\AccountInterface; use Drupal\grequest\MembershipRequestManager; use Drupal\group\Entity\GroupContentInterface; use Drupal\group\Entity\GroupInterface; use Drupal\group\Plugin\Group\Relation\GroupRelationInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** Loading Loading @@ -74,34 +75,34 @@ class GroupMembershipRequestController extends ControllerBase { */ public function requestMembership(GroupInterface $group) { $user = $this->entityTypeManager->getStorage('user')->load($this->currentUser->id()); $group_content = $this->membershipRequestManager->create($group, $user); return $this->entityFormBuilder()->getForm($group_content, 'group-request-membership'); $group_relation = $this->membershipRequestManager->create($group, $user); return $this->entityFormBuilder()->getForm($group_relation, 'group-request-membership'); } /** * Provides the form for approval a group membership. * * @param \Drupal\group\Entity\GroupContentInterface $group_content * The group content. * @param \Drupal\group\Plugin\Group\Relation\GroupRelationInterface $group_relation * The group relation. * * @return array * A group approval membership form. */ public function approveMembership(GroupContentInterface $group_content) { return $this->entityFormBuilder()->getForm($group_content, 'group-approve-membership'); public function approveMembership(GroupRelationInterface $group_relation) { return $this->entityFormBuilder()->getForm($group_relation, 'group-approve-membership'); } /** * Provides the form for rejection a group membership. * * @param \Drupal\group\Entity\GroupContentInterface $group_content * The group content. * @param \Drupal\group\Plugin\Group\Relation\GroupRelationInterface $group_relation * The group relation. * * @return array * A group rejection membership form. */ public function rejectMembership(GroupContentInterface $group_content) { return $this->entityFormBuilder()->getForm($group_content, 'group-reject-membership'); public function rejectMembership(GroupRelationInterface $group_relation) { return $this->entityFormBuilder()->getForm($group_relation, 'group-reject-membership'); } /** Loading Loading
src/Controller/GroupMembershipRequestController.php +11 −10 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Drupal\Core\Session\AccountInterface; use Drupal\grequest\MembershipRequestManager; use Drupal\group\Entity\GroupContentInterface; use Drupal\group\Entity\GroupInterface; use Drupal\group\Plugin\Group\Relation\GroupRelationInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** Loading Loading @@ -74,34 +75,34 @@ class GroupMembershipRequestController extends ControllerBase { */ public function requestMembership(GroupInterface $group) { $user = $this->entityTypeManager->getStorage('user')->load($this->currentUser->id()); $group_content = $this->membershipRequestManager->create($group, $user); return $this->entityFormBuilder()->getForm($group_content, 'group-request-membership'); $group_relation = $this->membershipRequestManager->create($group, $user); return $this->entityFormBuilder()->getForm($group_relation, 'group-request-membership'); } /** * Provides the form for approval a group membership. * * @param \Drupal\group\Entity\GroupContentInterface $group_content * The group content. * @param \Drupal\group\Plugin\Group\Relation\GroupRelationInterface $group_relation * The group relation. * * @return array * A group approval membership form. */ public function approveMembership(GroupContentInterface $group_content) { return $this->entityFormBuilder()->getForm($group_content, 'group-approve-membership'); public function approveMembership(GroupRelationInterface $group_relation) { return $this->entityFormBuilder()->getForm($group_relation, 'group-approve-membership'); } /** * Provides the form for rejection a group membership. * * @param \Drupal\group\Entity\GroupContentInterface $group_content * The group content. * @param \Drupal\group\Plugin\Group\Relation\GroupRelationInterface $group_relation * The group relation. * * @return array * A group rejection membership form. */ public function rejectMembership(GroupContentInterface $group_content) { return $this->entityFormBuilder()->getForm($group_content, 'group-reject-membership'); public function rejectMembership(GroupRelationInterface $group_relation) { return $this->entityFormBuilder()->getForm($group_relation, 'group-reject-membership'); } /** Loading