You are here

function signaturefield_widget_info in SignatureField 6

Implementation of hook_widget_info().

Here we indicate that the content module will handle the default value and multiple values for these widgets.

Callbacks can be omitted if default handing is used. They're included here just so this module can be used as an example for custom modules that might do things differently.

File

modules/content.inc, line 255
Content module integration.

Code

function signaturefield_widget_info() {
  return array(
    // The machine name of the widget, no more than 32
    // characters.
    'signaturefield_widget' => array(
      // The human-readable label of the field that will be
      // seen in the Manage fields screen.
      'label' => t('Signature field widget'),
      // An array of the field types this widget can be
      // used with.
      'field types' => array(
        'signaturefield',
      ),
      // Who will handle multiple values, default is core.
      // 'CONTENT_HANDLE_MODULE' means the module does it.
      // See optionwidgets for an example of a module that
      // handles its own multiple values.
      'multiple values' => CONTENT_HANDLE_CORE,
      'callbacks' => array(
        // Who will create the default value, default is core.
        // 'CONTENT_CALLBACK_CUSTOM' means the module does it.
        // 'CONTENT_CALLBACK_NONE' means this widget has
        // no default value.
        'default value' => CONTENT_CALLBACK_DEFAULT,
      ),
    ),
  );
}