function msnf_read_steps in Multistep Nodeform 7
Read all form steps.
Parameters
<array> $params: Parameters for the query
- $name The name of the entity.
- $bundle The name of the bundle.
Return value
<array> Array with all available steps keyed by entity type.
4 calls to msnf_read_steps()
- msnf_field_attach_delete_bundle in ./
msnf.module - Implements hook_field_attach_delete_bundle().
- msnf_info_steps in ./
msnf.module - Get all form steps.
- msnf_step_exists in ./
msnf.module - Checks if a form step exists in required context.
- _msnf_step_name_exists in includes/
msnf.field_ui.inc - Render API callback: Checks if a step machine name is taken.
File
- ./
msnf.module, line 734 - Main functions for module "Multistep Nodeform".
Code
function msnf_read_steps($params = array()) {
$steps = array();
ctools_include('export');
if (empty($params)) {
$records = ctools_export_load_object('msnf_step');
}
else {
$records = ctools_export_load_object('msnf_step', 'conditions', $params);
}
foreach ($records as $step) {
// Deleted form steps.
if (isset($step->disabled) && $step->disabled) {
continue;
}
$steps[$step->entity_type][$step->bundle][$step->step_name] = msnf_unpack($step);
}
return $steps;
}