You are here

function mailchimp_signup_admin_menu_map in Mailchimp 7.4

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_signup/mailchimp_signup.module \mailchimp_signup_admin_menu_map()

Implements hook_admin_menu_map().

File

modules/mailchimp_signup/mailchimp_signup.module, line 58
Mailchimp Signup module. Allows creation of signup forms integrated with Mailchimp.

Code

function mailchimp_signup_admin_menu_map() {
  if (!user_access('administer mailchimp signup entities')) {
    return;
  }
  $mailchimp_signups = mailchimp_signup_load_multiple();
  $path = 'admin/config/services/mailchimp/signup/manage/%mailchimp_signup_name';
  $mailchimp_signup_names = array();
  foreach ($mailchimp_signups as $mailchimp_signup) {
    $mailchimp_signup_names[] = $mailchimp_signup->name;
  }
  $map[$path] = array(
    'parent' => 'admin/config/services/mailchimp/signup',
    'arguments' => array(
      array(
        '%mailchimp_signup_name' => $mailchimp_signup_names,
      ),
    ),
  );
  return $map;
}