You are here

function ckeditor_profile_input_formats in CKEditor - WYSIWYG HTML editor 7

Return CKEditor profile list

2 calls to ckeditor_profile_input_formats()
ckeditor_modules_uninstalled in ./ckeditor.module
Implementation of hook_modules_uninstalled().
ckeditor_profiles_compile in includes/ckeditor.lib.inc
Compile settings of all profiles at returns is as array

File

includes/ckeditor.lib.inc, line 474
CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.

Code

function ckeditor_profile_input_formats() {
  $select = db_select('ckeditor_settings', 's');
  $select
    ->join('ckeditor_input_format', 'f', 'f.name = s.name');
  $result = $select
    ->fields('s', array(
    "name",
  ))
    ->fields('f', array(
    "format",
  ))
    ->execute();
  $list = array();
  while ($row = $result
    ->fetchAssoc()) {
    if (!isset($row['name'])) {
      $list[$row['name']] = array();
    }
    $list[$row['name']][] = $row['format'];
  }
  return $list;
}