You are here

function patterns_enable_pattern_submit in Patterns 7

Same name and namespace in other branches
  1. 5 patterns.module \patterns_enable_pattern_submit()
  2. 6.2 patterns.module \patterns_enable_pattern_submit()
  3. 6 patterns.module \patterns_enable_pattern_submit()
  4. 7.2 patterns.module \patterns_enable_pattern_submit()

Form submission handler for patterns_enable_pattern().

Takes the values from the form enable_pattern and starts the whole process by calling execute_pattern.

See also

patterns_enable_pattern()

File

./patterns.module, line 541

Code

function patterns_enable_pattern_submit($form, &$form_state) {
  $pid = $form_state['values']['pid'];
  patterns_io_load_components();
  $pattern = patterns_get_pattern($pid);
  patterns_start_engine($pattern, $form_state['values'], $form_state['values']['mode']);
  $form_state['redirect'] = 'admin/patterns';
}