You are here

function msnf_block_view in Multistep Nodeform 7

Implements hook_block_view().

File

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

Code

function msnf_block_view($delta = '') {
  $data = drupal_static('msnf_step_data');
  if (!empty($data)) {
    $block = array();
    $block['subject'] = t('Form steps');
    $block['content'] = array(
      '#theme' => 'msnf_block_step_info',
      '#steps' => $data['steps'],
      '#current_step' => $data['current_step'],
      '#form_state' => $data['form_state'],
      // Attach styling.
      '#attached' => array(
        'css' => array(
          drupal_get_path('module', 'msnf') . '/theme/msnf.steps.css',
        ),
      ),
    );
    return $block;
  }
}