You are here

function msnf_pack in Multistep Nodeform 7

Packs a Step object into a database row.

Parameters

<object> $step: The object to pack.

Return value

<object> $record Database row object, ready to be inserted/updated.

1 call to msnf_pack()
msnf_step_save in ./msnf.module
Saves a single step definition.

File

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

Code

function msnf_pack($step) {
  $record = clone $step;
  $record->data = array(
    'label' => $record->label,
    'weight' => $record->weight,
    'children' => $record->children,
    'format_type' => !empty($record->format_type) ? $record->format_type : 'default',
  );
  if (isset($record->format_settings)) {
    $record->data['format_settings'] = $record->format_settings;
  }
  return $record;
}