public function Role6::getPerms

8.0.x Role6.php public Role6::getPerms()
7.x Role6.php public Role6::getPerms()

Overrides RoleBase::getPerms

2 calls to Role6::getPerms()

File

lib/Drush/Role/Role6.php, line 8

Namespace

Drush\Role

Class

Role6

Code

public function getPerms() {
  if (empty($this->perms)) {
    $perms = db_result(db_query("SELECT perm FROM {permission} pm LEFT JOIN {role} r ON r.rid = pm.rid WHERE r.rid = '%d'", $this->rid));
    $role_perms = explode(", ", $perms);
    $this->perms = array_filter($role_perms);
  }
  return $this->perms;
}