You are here

class FooAdminPermissionProvider in Group 2.0.x

Alters admin permission for all plugins to original + 'foo'.

Hierarchy

Expanded class hierarchy of FooAdminPermissionProvider

1 string reference to 'FooAdminPermissionProvider'
group_test_plugin_alter.services.yml in tests/modules/group_test_plugin_alter/group_test_plugin_alter.services.yml
tests/modules/group_test_plugin_alter/group_test_plugin_alter.services.yml
2 services use FooAdminPermissionProvider
group.relation_handler_decorator.permission_provider.foo in tests/modules/group_test_plugin_alter/group_test_plugin_alter.services.yml
Drupal\group_test_plugin_alter\Plugin\Group\RelationHandler\FooAdminPermissionProvider
group.relation_handler_decorator.permission_provider.foo.entity_as_content in tests/modules/group_test_plugin_alter/group_test_plugin_alter.services.yml
Drupal\group_test_plugin_alter\Plugin\Group\RelationHandler\FooAdminPermissionProvider

File

tests/modules/group_test_plugin_alter/src/Plugin/Group/RelationHandler/FooAdminPermissionProvider.php, line 11

Namespace

Drupal\group_test_plugin_alter\Plugin\Group\RelationHandler
View source
class FooAdminPermissionProvider implements PermissionProviderInterface {
  use PermissionProviderTrait;

  /**
   * Constructs a new FooAdminPermissionProvider.
   *
   * @param \Drupal\group\Plugin\Group\RelationHandler\PermissionProviderInterface $parent
   *   The parent permission provider.
   */
  public function __construct(PermissionProviderInterface $parent) {
    $this->parent = $parent;
  }

  /**
   * {@inheritdoc}
   */
  public function getAdminPermission() {
    return $this->parent
      ->getAdminPermission() . 'foo';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FooAdminPermissionProvider::getAdminPermission public function Gets the name of the admin permission. Overrides PermissionProviderTrait::getAdminPermission
FooAdminPermissionProvider::__construct public function Constructs a new FooAdminPermissionProvider.
PermissionProviderTrait::$definesEntityPermissions protected property Whether the plugin defines permissions for the target entity type.
PermissionProviderTrait::$entityType protected property The entity type the plugin handler is for.
PermissionProviderTrait::$implementsOwnerInterface protected property Whether the target entity type implements the EntityOwnerInterface.
PermissionProviderTrait::$implementsPublishedInterface protected property Whether the target entity type implements the EntityPublishedInterface.
PermissionProviderTrait::buildPermission protected function Builds a permission with common translation arguments predefined.
PermissionProviderTrait::buildPermissions public function 4
PermissionProviderTrait::getPermission public function 4
PermissionProviderTrait::init public function
RelationHandlerTrait::$definition protected property The plugin definition.
RelationHandlerTrait::$entityTypeManager protected property The entity type manager.
RelationHandlerTrait::$groupRelationManager protected property The group relation manager.
RelationHandlerTrait::$parent protected property The parent relation handler in the decorator chain.
RelationHandlerTrait::$pluginId protected property The plugin ID as read from the definition.
RelationHandlerTrait::entityTypeManager protected function Gets the entity type manager service.
RelationHandlerTrait::groupRelationManager protected function Gets the group relation manager service.
RelationHandlerTrait::init public function Aliased as: traitInit