You are here

public function ProfilePermissions::profileTypePermissions in Profile 2 8

Returns an array of profile type permissions.

Return value

array

1 string reference to 'ProfilePermissions::profileTypePermissions'
profile.permissions.yml in ./profile.permissions.yml
profile.permissions.yml

File

src/ProfilePermissions.php, line 25
Contains \Drupal\profile\ProfilePermissions.

Class

ProfilePermissions
Defines a class containing permission callbacks.

Namespace

Drupal\profile

Code

public function profileTypePermissions() {
  $perms = array();

  // Generate profile permissions for all profile types.
  foreach (ProfileType::loadMultiple() as $type) {
    $perms += $this
      ->buildPermissions($type);
  }
  return $perms;
}