Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Default argument for current user memberships. #253

Closed
wants to merge 4 commits into from

Conversation

tombola
Copy link

@tombola tombola commented Apr 13, 2017

Issue #254:

Default argument to populate the contextual filter (eg groups_audience) used by the view.

@amitaibu

This comment has been minimized.

@tombola tombola force-pushed the default-argument-membership branch from f6d5007 to 1e6f95f Compare April 19, 2017 08:50
@tombola

This comment has been minimized.

*/
public function getArgument() {
// Currently restricted to node entities.
return implode(',', $this->getCurrentUserGroupIds('node'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could make it configurable - and expose the group related entities

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does sound a worthwhile aim.

I would likely need to return to this at a later date if I were to help with that though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tombola

This comment has been minimized.

@amitaibu

This comment has been minimized.

Copy link
Collaborator

@MPParsley MPParsley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some small comments wrt the phpdocs.

Since a user with the permission "administer group" has access to all of the groups, wouldn't it be useful to add an option to list all groups for users with this permission?

With exception for @amitaibu's remark on making the entity type configurable this seems to be ready.

src/Plugin/views/argument_default/Membership.php Outdated Show resolved Hide resolved
@MPParsley
Copy link
Collaborator

@tombola, could you add me as an author so I can fix the remarks/tests?

@MPParsley
Copy link
Collaborator

Closing in favor of #565.

@MPParsley MPParsley closed this Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants