[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/skinr/docs/ -> docs.php (summary)

(no description)

File Size: 111 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 functions

  hook_skinr_config()
  hook_skinr_api()

Functions
Functions that are not part of a class:

hook_skinr_config()   X-Ref
Configure Skinr for this module.

This hook should be placed in MODULENAME.skinr.inc and it will be auto-loaded.
This must either be in the same directory as the .module file or in a subdirectory
named 'includes'.

The configuration info is keyed by the MODULENAME. In the case of $data['block']
'block' is the name of the module.

There are two section to the configuration array:
- When you specify a "form", Skinr will insert its skins selector into the form
with the specified form_id. Example: $data[MODULENAME]['form'][FORM_ID] = ...
You can specify multiple forms that Skinr should add its skins selector to. A
good example where this would be needed is blocks where you have a different
form_id for adding a new block than when editing an existing block.
- When you specify "preprocess", Skinr will create a $vars['skinr'] variable
containing the appropriate skin classes for the specified preprocess hook.
Example: $data[MODULENAME]['preprocess'][PREPROCESS_HOOK] = ...

Form options:
- "index_handler" is required. It specifies a function that returns an index where
Skinr can find the values in its data structure.
- "access_handler" specifies a function that returns TRUE if you wish to grant access
to skinr, or FALSE if not.
- "data_handler" specifies a function that returns the data used to populate the form.
This is useful in cases where a module caches data (like panels and views) and has
an option to cancel changes.
- "submit_handler" specifies a function that process the form data and saves it.
- "preprocess_hook" is required. Each skin states which preprocess hooks it will
work for. This parameter will limit the available skins by the specified
preprocess hook.
- "title" overrides the default title on the Skinr fieldset.
- "description" overrides the default description that provides additional
information to the user about this Skinr selector.
- "weight" overrides the order where Skinrs selector appears on the form.
- "collapsed" sets whether the fieldset appears collapsed or not. Defaults to TRUE.
- "selector_weight" overrides the weight of the selector field inside the fieldset.
This is useful, for instance, if you have multiple modules add selectors to the
same form.
- "selector_title" overrides the title of the selector field inside the fieldset.

Preprocess options:
- "indexhandler" is required. It specifies a function that returns an index where
Skinr can find the values in its data structure.

hook_skinr_api()   X-Ref
Register Skinr API information. This is required for your module to have
its include files loaded.

The full documentation for this hook is in the advanced help.



Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7