function pmteam_insert in Drupal PM (Project Management) 7
Implements hook_insert().
1 call to pmteam_insert()
- pmteam_update in pmteam/
pmteam.module - Implements hook_update().
File
- pmteam/
pmteam.module, line 317 - Functionality for the Project Management Team module Organized into the following sections:
Code
function pmteam_insert($node) {
_pmteam_beforesave($node);
if (isset($node->vid) && isset($node->nid) && isset($node->members_array)) {
$member = new stdClass();
$member->nid = $node->nid;
$member->vid = $node->vid;
foreach ($node->members_array as $mnid => $member_name) {
$member->mnid = $mnid;
drupal_write_record('pmteam', $member);
}
}
}