You are here

protected function GroupPermissionsTypeSpecificForm::getGroupRoles in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Form/GroupPermissionsTypeSpecificForm.php \Drupal\group\Form\GroupPermissionsTypeSpecificForm::getGroupRoles()

Gets the group roles to display in this form.

Return value

\Drupal\group\Entity\GroupRoleInterface[] An array of group role objects.

Overrides GroupPermissionsForm::getGroupRoles

1 method overrides GroupPermissionsTypeSpecificForm::getGroupRoles()
GroupPermissionsOutsiderForm::getGroupRoles in src/Form/GroupPermissionsOutsiderForm.php
Gets the group roles to display in this form.

File

src/Form/GroupPermissionsTypeSpecificForm.php, line 86

Class

GroupPermissionsTypeSpecificForm
Provides the user permissions administration form for a specific group type.

Namespace

Drupal\group\Form

Code

protected function getGroupRoles() {
  $properties = [
    'group_type' => $this->groupType
      ->id(),
    'permissions_ui' => TRUE,
  ];
  return $this->entityTypeManager
    ->getStorage('group_role')
    ->loadByProperties($properties);
}