function tinymce_profile_overview in TinyMCE 6
Same name and namespace in other branches
- 5.2 tinymce.module \tinymce_profile_overview()
- 5 tinymce.module \tinymce_profile_overview()
- 6.2 tinymce.admin.inc \tinymce_profile_overview()
Controller for tinymce profiles.
1 call to tinymce_profile_overview()
- tinymce_admin in ./
tinymce.admin.inc - Controller for tinymce administrative settings.
File
- ./
tinymce.admin.inc, line 436 - Admin interface for TinyMCE module.
Code
function tinymce_profile_overview() {
$output = '';
$profiles = tinymce_profile_load();
if ($profiles) {
$roles = user_roles();
$header = array(
t('Profile'),
t('Roles'),
t('Operations'),
);
foreach ($profiles as $p) {
$rows[] = array(
array(
'data' => $p->name,
'valign' => 'top',
),
array(
'data' => implode("<br />\n", $p->rids),
),
array(
'data' => l(t('edit'), 'admin/settings/tinymce/edit/' . urlencode($p->name)) . ' ' . l(t('delete'), 'admin/settings/tinymce/delete/' . urlencode($p->name)),
'valign' => 'top',
),
);
}
$output .= theme('table', $header, $rows);
$output .= t('<p><a href="!create-profile-url">Create new profile</a></p>', array(
'!create-profile-url' => url('admin/settings/tinymce/add'),
));
}
else {
drupal_set_message(t('No profiles found. Click here to <a href="!create-profile-url">create a new profile</a>.', array(
'!create-profile-url' => url('admin/settings/tinymce/add'),
)));
}
return $output;
}