function ckeditor_link_autocomplete

cis7 ckeditor_link.module ckeditor_link_autocomplete($string = '')
cle7 ckeditor_link.module ckeditor_link_autocomplete($string = '')
elmsmedia7 ckeditor_link.module ckeditor_link_autocomplete($string = '')
icor7 ckeditor_link.module ckeditor_link_autocomplete($string = '')
meedjum_blog7 ckeditor_link.module ckeditor_link_autocomplete($string = '')
mooc7 ckeditor_link.module ckeditor_link_autocomplete($string = '')
1 string reference to 'ckeditor_link_autocomplete'
ckeditor_link_menu in sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module
Implementation of hook_menu().

File

sites/all/modules/ulmus/ckeditor_link/ckeditor_link.module, line 44
Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr

Code

function ckeditor_link_autocomplete($string = '') {
  $matches = array();

  if ($string !== '') {
    $types = ckeditor_link_get_types();
    $limit = variable_get('ckeditor_link_limit', 10);
    $results = array();
    foreach ($types as $type) {
      $func = $type['module'] . '_ckeditor_link_' . $type['type'] . '_autocomplete';
      if (function_exists($func)) {
        $results += $func($string, $limit);
        if (count($results) > $limit) {
          break;
        }
      }
    }
    drupal_alter('ckeditor_link_autocomplete', $results, $string);

    array_splice($results, $limit);
    foreach ($results as $path => $title) {
      $matches[$title . ' (' . $path . ')'] = '<div class="reference-autocomplete">' . check_plain($title) . '</div>';
    }
  }

  drupal_json_output($matches);
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.