You are here

function system_patterns_callbacks in Patterns 7

File

patterns_components/components/system.inc, line 330

Code

function system_patterns_callbacks($action, $tag, &$data) {
  if ($tag == 'modules') {

    // Custom functions will do the work.
    $result = array(
      'modules_execute',
    );
  }
  elseif ($tag == 'variables') {

    // Custom functions will do the work.
    $result = array(
      'variables_execute',
    );
  }
  else {

    // Just regular forms.
    $data['tag'] = 'form';
    $desc = system_patterns($data);
    unset($data['tag']);
    $result = $desc[$tag][$action];
  }
  return patterns_results(PATTERNS_SUCCESS, t('Execution successful'), $result);
}