You are here

public function ProfileType::setRoles in Profile 8

Sets the user roles allowed to have profiles of this type.

Parameters

string[] $rids: The role IDs.

Return value

$this

Overrides ProfileTypeInterface::setRoles

File

src/Entity/ProfileType.php, line 177

Class

ProfileType
Defines the profile type entity class.

Namespace

Drupal\profile\Entity

Code

public function setRoles(array $roles) {
  $this->roles = $roles;
  return $this;
}