Mailinglist
 All Data Structures Files Functions Variables Pages
Functions
mailinglist_members.install File Reference

Install, update and uninstall functions for the Mailinglist_Members module. More...

Go to the source code of this file.

Functions

 mailinglist_members_schema ()
 Implements hook_schema(). More...
 
 mailinglist_members_enable ()
 function mailinglist_members_update_7000() { } More...
 
 mailinglist_members_modules_enabled ($modules)
 Implements hook_modules_enabled(). More...
 

Detailed Description

Install, update and uninstall functions for the Mailinglist_Members module.

Definition in file mailinglist_members.install.

Function Documentation

mailinglist_members_enable ( )

function mailinglist_members_update_7000() { }

Implements hook_enable().

Definition at line 29 of file mailinglist_members.install.

29  {
30 }
mailinglist_members_modules_enabled (   $modules)

Implements hook_modules_enabled().

Todo:
should only do this for list with members enabled, and redo when members is enabled on a list.

Definition at line 35 of file mailinglist_members.install.

References mailinglist_list_load_all().

35  {
36  // Make sure all previous created lists have roles created.
39  $lists = mailinglist_list_load_all();
40  foreach ($lists as $list) {
41  $rolename = 'Mailingling List Subscriber ' . $list->admin_name;
42  if (!user_role_load_by_name($rolename)) {
43  $role = new stdClass();
44  $role->name = $rolename;
45  dpm($role, 'Make Role');
46  user_role_save($role);
47  }
48  }
49 }
mailinglist_list_load_all($show_disabled=TRUE)
Load all mailinglists.

Here is the call graph for this function:

mailinglist_members_schema ( )

Implements hook_schema().

Definition at line 10 of file mailinglist_members.install.

References _mailinglist_members_list_schema(), and mailinglist_list_load_all().

10  {
11  $schema=array();
12  $lists = mailinglist_list_load_all();
13  foreach ($lists as $list) {
14  $list_schema = _mailinglist_members_list_schema($list);
15  $schema += $list_schema;
16  }
17  return $schema;
18 }
_mailinglist_members_list_schema(MailinglistListInterface $list)
Builds the schema needed by mailinglist_members for a specific list.
mailinglist_list_load_all($show_disabled=TRUE)
Load all mailinglists.

Here is the call graph for this function: