You are here

protected function GroupPermissionsOutsiderForm::getGroupRoles in Group 8

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

Gets the group roles to display in this form.

Return value

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

Overrides GroupPermissionsTypeSpecificForm::getGroupRoles

File

src/Form/GroupPermissionsOutsiderForm.php, line 73

Class

GroupPermissionsOutsiderForm
Permission form for the synchronized outsider roles for a group type.

Namespace

Drupal\group\Form

Code

protected function getGroupRoles() {

  /** @var \Drupal\group\Entity\Storage\GroupRoleStorageInterface $storage */
  $storage = $this->entityTypeManager
    ->getStorage('group_role');
  return $storage
    ->loadSynchronizedByGroupTypes([
    $this->groupType
      ->id(),
  ]);
}