public function ImceSettingsForm::buildRowsProfilesTables in IMCE 8.2
Same name and namespace in other branches
- 8 src/Form/ImceSettingsForm.php \Drupal\imce\Form\ImceSettingsForm::buildRowsProfilesTables()
Create tables profiles rows.
1 call to ImceSettingsForm::buildRowsProfilesTables()
- ImceSettingsForm::buildRolesProfilesTable in src/
Form/ ImceSettingsForm.php - Returns roles-profiles table.
File
- src/
Form/ ImceSettingsForm.php, line 161
Class
- ImceSettingsForm
- Imce settings form.
Namespace
Drupal\imce\FormCode
public function buildRowsProfilesTables($roles, $roles_profiles, $wrappers) {
// Prepare roles.
$rp_table = [];
foreach ($roles as $rid => $role) {
$rp_table[$rid]['role_name'] = [
'#plain_text' => $role
->label(),
];
foreach ($wrappers as $scheme => $name) {
$rp_table[$rid][$scheme] = [
'#type' => 'select',
'#options' => $this
->getProfileOptions(),
'#default_value' => isset($roles_profiles[$rid][$scheme]) ? $roles_profiles[$rid][$scheme] : '',
];
}
}
return $rp_table;
}