public function PeopleDelete::getAvailableRoleType in Delete all 8
Same name and namespace in other branches
- 2.x src/Form/PeopleDelete.php \Drupal\delete_all\Form\PeopleDelete::getAvailableRoleType()
It return the availble role type, into an associative array form.
1 call to PeopleDelete::getAvailableRoleType()
- PeopleDelete::buildForm in src/
Form/ PeopleDelete.php - Form constructor.
File
- src/
Form/ PeopleDelete.php, line 81
Class
- PeopleDelete
- Form for user deleting option.
Namespace
Drupal\delete_all\FormCode
public function getAvailableRoleType() {
$userTypes = $this->roleType
->loadMultiple();
$userTypeList = [];
foreach (array_slice($userTypes, 2) as $userType) {
$userTypeList[$userType
->id()] = $userType
->label();
}
return $userTypeList;
}