function wysiwyg_wrap_js_callback in Wysiwyg 5.2
Same name and namespace in other branches
- 6.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_INCLUDE_plugin in ./
wysiwyg.api.php - Define a Wysiwyg plugin.
- hook_wysiwyg_plugin in ./
wysiwyg.api.php - Return an array of native editor plugins.
File
- ./
wysiwyg.module, line 944 - Integrate 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;
}