function uuid_link_form_post_build in UUID Link 6
1 string reference to 'uuid_link_form_post_build'
- uuid_link_form_alter in ./
uuid_link.module - Post render callback. Load javascript files and set module settings.
File
- ./
uuid_link.module, line 73 - Provides a filter and UI for adding links to entities that are not affected by changes in URL alias.
Code
function uuid_link_form_post_build($form) {
static $added;
if (empty($added) && ($js = drupal_add_js()) && isset($js['setting'])) {
$settings = call_user_func_array('array_merge_recursive', $js['setting']);
if (isset($settings['ckeditor']) || isset($settings['wysiwyg']['configs']['ckeditor'])) {
$added = TRUE;
drupal_add_js('misc/autocomplete.js');
$settings = array(
'autocomplete_path' => url('uuid-link/autocomplete'),
'type_name' => uuid_link_get_link_type_name(),
);
drupal_add_js(array(
'uuid_link' => $settings,
), 'setting');
}
}
return $form;
}