function wysiwyg_wrap_js_callback in Wysiwyg 6.2
Same name and namespace in other branches
- 5.2 wysiwyg.module \wysiwyg_wrap_js_callback()
- 7.2 wysiwyg.module \wysiwyg_wrap_js_callback()
Create a placeholder structure for JavaScript callbacks.
Parameters
$name: A string with the name of the callback, use 'object.subobject.method' syntax for methods in nested objects.
$context: An optional string with the name of an object for overriding 'this' inside the function. Use 'object.subobject' syntax for nested objects. Defaults to the window object.
Return value
An array with placeholder information for creating a JavaScript function reference on the client.
Related topics
2 calls to wysiwyg_wrap_js_callback()
- hook_wysiwyg_editor_settings_alter in ./
wysiwyg.api.php - Act on editor profile settings.
- wysiwyg_tinymce_settings in editors/
tinymce.inc - Return runtime editor settings for a given wysiwyg profile.
File
- ./
wysiwyg.module, line 1260 - Integrates client-side editors with Drupal.
Code
function wysiwyg_wrap_js_callback($name, $context = NULL) {
$obj = array(
'drupalWysiwygType' => 'callback',
'name' => $name,
);
if ($context) {
$obj['context'] = $context;
}
return $obj;
}