public function ImceSettingsForm::buildHeaderProfilesTable in IMCE 8.2
Same name and namespace in other branches
- 8 src/Form/ImceSettingsForm.php \Drupal\imce\Form\ImceSettingsForm::buildHeaderProfilesTable()
Build header.
Return value
array Array of headers items.
1 call to ImceSettingsForm::buildHeaderProfilesTable()
- ImceSettingsForm::buildRolesProfilesTable in src/
Form/ ImceSettingsForm.php - Returns roles-profiles table.
File
- src/
Form/ ImceSettingsForm.php, line 145
Class
- ImceSettingsForm
- Imce settings form.
Namespace
Drupal\imce\FormCode
public function buildHeaderProfilesTable() : array {
$wrappers = $this->streamWrapperManager
->getNames(StreamWrapperInterface::WRITE_VISIBLE);
$imce_url = Url::fromRoute('imce.page')
->toString();
$rp_table['#header'] = [
$this
->t('Role'),
];
$default = $this->configSystemFile
->get('default_scheme');
foreach ($wrappers as $scheme => $name) {
$url = $scheme === $default ? $imce_url : $imce_url . '/' . $scheme;
$rp_table['#header'][]['data'] = [
'#markup' => '<a href="' . $url . '">' . Html::escape($name) . '</a>',
];
}
return $rp_table;
}