public function ImceSettingsForm::buildRolesProfilesTable in IMCE 8
Same name and namespace in other branches
- 8.2 src/Form/ImceSettingsForm.php \Drupal\imce\Form\ImceSettingsForm::buildRolesProfilesTable()
Returns roles-profiles table.
1 call to ImceSettingsForm::buildRolesProfilesTable()
- ImceSettingsForm::buildForm in src/
Form/ ImceSettingsForm.php - Form constructor.
File
- src/
Form/ ImceSettingsForm.php, line 183
Class
- ImceSettingsForm
- Imce settings form.
Namespace
Drupal\imce\FormCode
public function buildRolesProfilesTable(array $roles_profiles) {
$rp_table = [
'#type' => 'table',
];
$roles = user_roles();
$wrappers = $this->streamWrapperManager
->getNames(StreamWrapperInterface::WRITE_VISIBLE);
$imce_url = Url::fromRoute('imce.page')
->toString();
$rp_table += $this
->buildHeaderProfilesTable($wrappers);
$rp_table += $this
->buildRowsProfilesTables($roles, $roles_profiles, $wrappers);
// Add description.
$rp_table['#prefix'] = '<h3>' . $this
->t('Role-profile assignments') . '</h3>';
$rp_table['#suffix'] = '<div class="description">' . $this
->t('Assign configuration profiles to user roles for available file systems. Users with multiple roles get the bottom most profile.') . ' ' . $this
->t('The default file system %name is accessible at :url path.', [
'%name' => $wrappers[$this->configSystemFile
->get('default_scheme')],
':url' => $imce_url,
]) . '</div>';
return $rp_table;
}