You are here

function tinymce_profile_overview in TinyMCE 5

Same name and namespace in other branches
  1. 5.2 tinymce.module \tinymce_profile_overview()
  2. 6.2 tinymce.admin.inc \tinymce_profile_overview()
  3. 6 tinymce.admin.inc \tinymce_profile_overview()

Controller for tinymce profiles.

1 call to tinymce_profile_overview()
tinymce_admin in ./tinymce.module
Controller for tinymce administrative settings.

File

./tinymce.module, line 1042
Integrate the TinyMCE editor (http://tinymce.moxiecode.com/) into Drupal.

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' => filter_xss($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;
}