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

Commit

Permalink
Update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrenssen committed Jul 31, 2020
1 parent f746f17 commit dd24dcf
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions src/PermissionManagerInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types = 1);

namespace Drupal\og;

/**
Expand All @@ -21,7 +23,7 @@ interface PermissionManagerInterface {
* @param array $group_content_bundle_ids
* An array of group content bundle IDs, keyed by group content entity type
* ID.
* @param string $role_name
* @param string|null $role_name
* Optional default role name to filter the permissions on. If omitted, all
* permissions will be returned.
*
Expand All @@ -33,14 +35,23 @@ public function getDefaultPermissions($group_entity_type_id, $group_bundle_id, a
/**
* Returns permissions that are enabled by default for the given role.
*
* This returns group level permissions such as 'subscribe without approval'
* and 'administer group'.
* This returns the group level permissions that are populated by default when
* a new group is created. For example the 'manage members' permission is
* granted by default to the administrator role, and the 'subscribe'
* permission to the anonymous role.
*
* New default permissions can be added by creating an event listener for the
* PermissionEvent. The default permissions that ship with Organic Groups can
* be found in OgEventSubscriber::provideDefaultOgPermissions().
*
* @see \Drupal\og\Event\PermissionEventInterface
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::provideDefaultOgPermissions()
*
* @param string $group_entity_type_id
* The entity type ID of the group for which to return permissions.
* @param string $group_bundle_id
* The bundle ID of the group for which to return permissions.
* @param string $role_name
* @param string|null $role_name
* Optional default role name to filter the permissions on. If omitted, all
* permissions will be returned.
*
Expand All @@ -55,14 +66,23 @@ public function getDefaultGroupPermissions($group_entity_type_id, $group_bundle_
* This returns group content entity operation permissions such as 'edit own
* article content'.
*
* New default group content entity operation permissions can be added by
* creating an event listener for the PermissionEvent. The default group
* content operation permissions that ship with Organic Groups can be found in
* OgEventSubscriber.
*
* @see \Drupal\og\Event\PermissionEventInterface
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::provideDefaultNodePermissions()
* @see \Drupal\og\EventSubscriber\OgEventSubscriber::getDefaultEntityOperationPermissions()
*
* @param string $group_entity_type_id
* The entity type ID of the group for which to return permissions.
* @param string $group_bundle_id
* The bundle ID of the group for which to return permissions.
* @param array $group_content_bundle_ids
* An array of group content bundle IDs, keyed by group content entity type
* ID.
* @param string $role_name
* @param string|null $role_name
* Optional default role name to filter the permissions on. If omitted, all
* permissions will be returned.
*
Expand Down

0 comments on commit dd24dcf

Please sign in to comment.