protected function convertPermissions(array &$permissions) {
    $all_permissions = $this->getAllPermissions();

    foreach ($all_permissions as $name => $definition) {
      $key = array_search($definition['title'], $permissions);
      if (FALSE !== $key) {
        $permissions[$key] = $name;
      }
    }
  }
protected function convertPermissions(array &$permissions) {
    $all_permissions = $this->getAllPermissions();

    foreach ($all_permissions as $name => $definition) {
      $key = array_search($definition['title'], $permissions);
      if (FALSE !== $key) {
        $permissions[$key] = $name;
      }
    }
  }
protected function convertPermissions ( array & $ permissions ) { $ all_permissions = $ this -> getAllPermissions ( ) ; foreach ( $ all_permissions as $ name => $ definition ) { $ key = array_search ( $ definition [ 'title' ] , $ permissions ) ; if ( FALSE !== $ key ) { $ permissions [ $ key ] = $ name ; } } }
Convert any permission labels to machine name.

@param array &$permissions
Array of permission names.
Convert any permission labels to machine name .