You are here

function gmap_cck_widget_settings in GMap Addons 5

Same name and namespace in other branches
  1. 6 gmap_cck.module \gmap_cck_widget_settings()
  2. 7 gmap_cck.module \gmap_cck_widget_settings()

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.

File

./gmap_cck.module, line 334
display of a google map as cck field

Code

function gmap_cck_widget_settings($op, $widget) {
  switch ($op) {
    case 'callbacks':

      // CHECK: do we need this ???
      return array(
        'default value' => CONTENT_CALLBACK_CUSTOM,
      );
  }
}