You are here

function hook_fz152_info in FZ152 7

Implements hook_fz152_info(). With this hook, every module can define form_id's with checkbox weights which will be passed to core code and will add checkbox to the form if it match.

Return value

array Information about module forms and their settings. Array key will be used as path for settings. /admin/config/system/fz152/[key]. Possible values:

  • "title": String with title for tab and page with settings.
  • "weight": (optional) Int value with weight of tab with settings.
  • "form callback": Function to invoke with all forms which must be altered. array('form_id' => 'form_*_name', 'weight' => 0). Form id is supporting for wildcard and weight is used for checkbox position in that form.
  • "page callback": (optional) Function to invoke which return page for your module in main tabs. If you don't need it, leave it empty.
  • "page arguments": (optional) Array of arguments which will be passed to page callback function if provided.

See also

fz152_fz152_info()

3 functions implement hook_fz152_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

fz152_entityform_fz152_info in module/entityform/fz152_entityform.module
Implements hook_fz152_info().
fz152_fz152_info in ./fz152.module
Implements hook_fz152_info().
fz152_webform_fz152_info in module/webform/fz152_webform.module
Implements hook_fz152_info().
1 invocation of hook_fz152_info()
fz152_info in ./fz152.module
Invoke all hook_fz152_info().

File

./fz152.api.php, line 28
File with API from this module with examples.

Code

function hook_fz152_info() {
  $info = [
    'my-forms' => [
      'title' => 'My forms settings',
      'weight' => 0,
      'form callback' => 'my_forms_forms',
      'page callback' => 'my_forms_settings',
      'page arguments' => array(
        'arg1',
        'arg2',
      ),
    ],
  ];
  return $info;
}