You are here

class FullEntityPermissionProvider in Group 8

Provides all possible permissions.

Hierarchy

Expanded class hierarchy of FullEntityPermissionProvider

File

tests/modules/group_test_plugin/src/Plugin/GroupContentEnabler/FullEntityPermissionProvider.php, line 10

Namespace

Drupal\group_test_plugin\Plugin\GroupContentEnabler
View source
class FullEntityPermissionProvider extends GroupContentPermissionProvider {

  /**
   * {@inheritdoc}
   */
  public function getEntityViewPermission($scope = 'any') {
    if ($this->definesEntityPermissions) {
      if ($this->implementsOwnerInterface || $scope === 'any') {
        return "view {$scope} {$this->pluginId} entity";
      }
    }
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityViewUnpublishedPermission($scope = 'any') {
    if ($this->definesEntityPermissions) {
      if ($this->implementsPublishedInterface) {
        if ($this->implementsOwnerInterface || $scope === 'any') {
          return "view {$scope} unpublished {$this->pluginId} entity";
        }
      }
    }
    return FALSE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FullEntityPermissionProvider::getEntityViewPermission public function Gets the name of the view permission for the relation. Overrides GroupContentPermissionProvider::getEntityViewPermission
FullEntityPermissionProvider::getEntityViewUnpublishedPermission public function Gets the name of the view unpublished permission for the relation. Overrides GroupContentPermissionProvider::getEntityViewUnpublishedPermission
GroupContentHandlerBase::$definition protected property The group content enabler definition.
GroupContentHandlerBase::$moduleHandler protected property The module handler to invoke hooks on.
GroupContentHandlerBase::$pluginId protected property The plugin ID as read from the definition.
GroupContentHandlerBase::moduleHandler protected function Gets the module handler.
GroupContentHandlerBase::setModuleHandler public function Sets the module handler for this handler.
GroupContentHandlerBase::__construct public function Constructs a GroupContentHandlerBase object.
GroupContentPermissionProvider::$definesEntityPermissions protected property Whether the plugin defines permissions for the target entity type.
GroupContentPermissionProvider::$entityType protected property The entity type the enabler is for.
GroupContentPermissionProvider::$implementsOwnerInterface protected property Whether the target entity type implements the EntityOwnerInterface.
GroupContentPermissionProvider::$implementsPublishedInterface protected property Whether the target entity type implements the EntityPublishedInterface.
GroupContentPermissionProvider::buildPermission protected function Builds a permission with common translation arguments predefined.
GroupContentPermissionProvider::buildPermissions public function Provides a list of group permissions the plugin exposes. Overrides GroupContentPermissionProviderInterface::buildPermissions 1
GroupContentPermissionProvider::createInstance public static function Instantiates a new instance of this group content handler. Overrides GroupContentHandlerBase::createInstance
GroupContentPermissionProvider::getAdminPermission public function Gets the name of the admin permission. Overrides GroupContentPermissionProviderInterface::getAdminPermission
GroupContentPermissionProvider::getEntityCreatePermission public function Gets the name of the create permission for the relation. Overrides GroupContentPermissionProviderInterface::getEntityCreatePermission
GroupContentPermissionProvider::getEntityDeletePermission public function Gets the name of the delete permission for the relation. Overrides GroupContentPermissionProviderInterface::getEntityDeletePermission
GroupContentPermissionProvider::getEntityUpdatePermission public function Gets the name of the update permission for the relation. Overrides GroupContentPermissionProviderInterface::getEntityUpdatePermission
GroupContentPermissionProvider::getPermission public function Gets the name of the permission for the given operation, target and scope. Overrides GroupContentPermissionProviderInterface::getPermission
GroupContentPermissionProvider::getRelationCreatePermission public function Gets the name of the create permission for the relation. Overrides GroupContentPermissionProviderInterface::getRelationCreatePermission 1
GroupContentPermissionProvider::getRelationDeletePermission public function Gets the name of the delete permission for the relation. Overrides GroupContentPermissionProviderInterface::getRelationDeletePermission 1
GroupContentPermissionProvider::getRelationUpdatePermission public function Gets the name of the update permission for the relation. Overrides GroupContentPermissionProviderInterface::getRelationUpdatePermission 1
GroupContentPermissionProvider::getRelationViewPermission public function Gets the name of the view permission for the relation. Overrides GroupContentPermissionProviderInterface::getRelationViewPermission