You are here

function msnf_step_export_delete in Multistep Nodeform 7

Delete a single step.

Parameters

<object> $step: A step definition.

<boolean> $ctools_crud: Whether this function is called by the ctools crud delete.

1 call to msnf_step_export_delete()
msnf_delete_form_submit in includes/msnf.field_ui.inc
Remove step from bundle.
1 string reference to 'msnf_step_export_delete'
msnf_schema in ./msnf.install
Implements hook_schema().

File

./msnf.module, line 829
Main functions for module "Multistep Nodeform".

Code

function msnf_step_export_delete($step, $ctools_crud = TRUE) {
  $query = db_delete('msnf_step');
  if (isset($step->identifier)) {
    $query
      ->condition('identifier', $step->identifier);
    if (!$ctools_crud) {
      ctools_export_crud_disable('msnf_step', $step->identifier);
    }
  }
  elseif (isset($step->id)) {
    $query
      ->condition('id', $step->id);
  }
  $query
    ->execute();
  cache_clear_all('msnf_steps', 'cache_field');
  module_invoke_all('msnf_delete_step', $step);
}