You are here

function signup_profile_signup_pane_info in Signup 6.2

Implementation of hook_signup_pane_info().

Parameters

$node: (optional) The node being considered for panes. Most modules won't need to look at this, but you may need to only return panes if the node satisfies certain properties.

This should return an associative array of data about signup form panes.

File

modules/signup_profile/signup_profile.module, line 29
signup_profile.module Provides integration with profile module.

Code

function signup_profile_signup_pane_info($node = NULL) {

  // Get the categories. This may return NULL if none are defined yet.
  $categories = _signup_profile_available_categories();
  if (!is_null($categories)) {
    foreach ($categories as $category) {

      // Make a pane for each category.
      $panes['profile_' . $category['name']] = array(
        'label' => 'Profile: ' . $category['name'],
        'description' => t('Collects @category profile fields and saves to the user profile.', array(
          '@category' => $category['name'],
        )),
        'callback' => 'signup_profile_form',
      );
    }
  }
  return $panes;
}