Definition
gmap_cck_widget_settings($op, $widget)
gmap_addons/gmap_cck.module, line 335
Description
Handle the parameters for a widget.
Parameters
$op
The operation to be performed. Possible values:
- "form": Display the widget settings form.
- "validate": Check the widget settings form for errors.
- "save": Declare which pieces of information to save back to the database.
- "callbacks": Describe the widget's behaviour regarding hook_widget operations.
$widget
The widget on which the operation is to be performed.
Return value
This varies depending on the operation.
- "form": an array of form elements to add to the settings page.
- "validate": no return value. Use form_set_error().
- "save": an array of names of form elements to be saved in the database.
- "callbacks": an array describing the widget's behaviour regarding hook_widget
operations. The array is keyed by hook_widget operations ('form', 'validate'...)
and has the following possible values :
CONTENT_CALLBACK_NONE : do nothing for this operation
CONTENT_CALLBACK_CUSTOM : use the behaviour in hook_widget(operation)
CONTENT_CALLBACK_DEFAULT : use content.module's default bahaviour
Note : currently only the 'default value' operation implements this feature.
All other widget operation implemented by the module _will_ be executed
no matter what.
Related topics
Name | Description |
| Hooks | Allow modules to interact with the Drupal core. |
Code
<?php
function gmap_cck_widget_settings($op, $widget) {
switch ($op) {
case 'callbacks': return array(
'default value' => CONTENT_CALLBACK_CUSTOM,
);
}
}
?>