You are here

function fusion_apply_handler in Fusion Accelerator 7

Same name and namespace in other branches
  1. 7.2 fusion_apply/fusion_apply.module \fusion_apply_handler()

Execute a module's data handler.

Parameters

$type: The type of handler to execute. Possible values:

  • 'access_handler':
  • 'contextual_links':
  • 'data_handler':
  • 'form_index_handler':
  • 'preprocess_index_handler':
  • 'preprocess_hook_callback':
  • 'submit_handler':

$op: For 'access_handler' the possible values are 'edit skin settings' and 'edit advanced skin settings'. For 'contextual_links' an empty string is passed. For 'data_handler' the possible values are 'form' and 'submit'. For 'form_index_handler' the possible values are 'form' and 'submit'. For 'preprocess_index_handler' the possible values are 'preprocess'. For 'preprocess_hook_callback' an empty string is passed. For 'submit_handler' an empty string is passed.

$handler: The function name for this handler as gotten from fusion_apply_fetch_config().

$a3: For 'access_handler', passes in the $form parameter as provided to a form function. For 'contextual_links', passes in the $variables parameter from fusion_apply_preprocess(). For 'data_handler', passes in the $form parameter from hook_form_submit(). For 'form_index_handler':

  • For $op 'form', passes in the $form parameter from hook_form_alter().
  • For $op 'submit', passes in the $form parameter from hook_form_submit().

For 'preprocess_index_handler', passes in the $variables parameter from module_preprocess(). For 'preprocess_hook_callback', passes in the $form parameter from hook_form_alter(). For 'submit_handler', passes in the $form parameter from hook_form_alter().

$a4: For 'access_handler', passes in the $form_state array as provided to a form function. For 'data_handler', passes in the $form_state parameter form hook_form_submit(). For 'form_index_handler':

  • For $op 'form', passes in the $form_state parameter from hook_form_alter().
  • For $op 'submit', passes in the $form_state parameter from hook_form_submit().

For 'preprocess_hook_callback', passes in the $form_state parameter from hook_form_alter(). For 'submit_handler', passes in the $form_state parameter from hook_form_alter().

$a5: For 'data_handler', passes in the module that is currently being processed. For 'submit_handler', passes in the module that is currently being processed.

$a6: For 'data_handler', passes in the settings from hook_fusion_apply_config() for the form that's currently being processed. For 'submit_handler', passes in the settings from hook_fusion_apply_config() for the form that's currently being processed.

$a7:

6 calls to fusion_apply_handler()
fusion_apply_data_handler in fusion_apply/fusion_apply.handlers.inc
Fusion Apply data handler.
fusion_apply_preprocess in fusion_apply/fusion_apply.module
Implements hook_preprocess().
fusion_apply_submit_handler in fusion_apply/fusion_apply.handlers.inc
Fusion Apply submit handler.
fusion_apply_ui_form_alter in fusion_apply/fusion_apply_ui.module
Implements hook_form_alter().
fusion_apply_ui_form_submit in fusion_apply/fusion_apply_ui.module
Form submission handler for fusion_apply_ui_form_alter().

... See full list

File

fusion_apply/fusion_apply.module, line 1082
Handles core Fusion Apply functionality.

Code

function fusion_apply_handler($type, $op, $handler, &$a3, $a4 = NULL, $a5 = NULL, $a6 = NULL, $a7 = NULL) {
  if (is_callable($handler)) {
    switch ($type) {
      case 'contextual_links':
      case 'preprocess_index_handler':
        return $handler($a3);
      case 'preprocess_hook_callback':
        return $handler($a3, $a4);
      case 'data_handler':
      case 'submit_handler':
        return $handler($a3, $a4, $a5, $a6, $a7);
      default:
        return $handler($op, $a3, $a4);
    }
  }
}