function msnf_info_steps in Multistep Nodeform 7
Get all form steps.
Parameters
<string> $entity_type: The name of the entity.
<string> $bundle: The name of the bundle.
<boolean> $reset: Whether to reset the cache or not.
<array> $form: The form the steps are (or will be) attached to.
Return value
<array> List of all defined steps for the given entity type and bundle.
6 calls to msnf_info_steps()
- msnf_attach_steps in ./
msnf.module - Attach steps to the (form) build.
- msnf_field_extra_fields in ./
msnf.module - Implements hook_field_extra_fields().
- msnf_field_info_max_weight in includes/
msnf.field_ui.inc - Implements hook_field_info_max_weight().
- msnf_field_overview_submit in includes/
msnf.field_ui.inc - Submit handler for the overview screens.
- msnf_field_ui_form_params in includes/
msnf.field_ui.inc - Helper function to get the form parameters to use while building the fields overview form.
File
- ./
msnf.module, line 689 - Main functions for module "Multistep Nodeform".
Code
function msnf_info_steps($entity_type, $bundle = NULL, $reset = FALSE, $form = array(), $form_state = array()) {
$steps_cached =& drupal_static(__FUNCTION__, FALSE);
if (!$steps_cached || $reset) {
if (!$reset && ($cached = cache_get('msnf_steps', 'cache_field'))) {
$steps_cached = $cached->data;
}
else {
$steps_cached = msnf_read_steps();
cache_set('msnf_steps', $steps_cached, 'cache_field');
}
}
// Allow other modules to alter step information.
$context = array(
'form' => $form,
'form_state' => $form_state,
'entity_type' => $entity_type,
'bundle' => $bundle,
);
drupal_alter('msnf_info_steps', $steps_cached, $context);
if (isset($steps_cached[$entity_type])) {
if (isset($steps_cached[$entity_type][$bundle])) {
return $steps_cached[$entity_type][$bundle];
}
elseif ($bundle === NULL) {
return $steps_cached[$entity_type];
}
}
return array();
}