You are here

function om_tools_processor in OM Tools 6.2

Same name and namespace in other branches
  1. 8.2 inc/om_tools.utils.inc \om_tools_processor()
  2. 7.2 inc/om_tools.utils.inc \om_tools_processor()

OM Tools processor

2 calls to om_tools_processor()
om_tools_preprocess_block in ./om_tools.module
Override or insert om variables into the templates.
om_tools_preprocess_page in ./om_tools.module
Override or insert om variables into the templates.

File

inc/om_tools.utils.inc, line 40
OM Tools Admin Utilities

Code

function om_tools_processor(&$vars, $process = NULL) {
  $om_tools_values = variable_get('om_tools', '');

  //dsm($om_tools_values);
  $tools = om_tools_get();
  foreach ($tools as $key => $module) {
    $vars['om_' . $module . '_tools_values'] = isset($om_tools_values[$module]) ? $om_tools_values[$module] : '';
    include_once drupal_get_path('module', 'om_tools') . '/tools/' . $module . '/' . $module . '.inc';
    $function = 'om_' . $module . '_' . $process;
    if (function_exists($function)) {
      $function($vars);
    }

    // this avoids inclusion in the actual output of form
    if (isset($vars['om_' . $module . '_tools_values'])) {
      unset($vars['om_' . $module . '_tools_values']);
    }
  }
}