function signup_load_signup in Signup 6.2
Same name and namespace in other branches
- 6 signup.module \signup_load_signup()
- 7 signup.module \signup_load_signup()
Load a $signup object from the given Signup ID (sid).
In addition to pulling all the fields from the {signup_log} table, this method also adds a "label" member to the object which is used by Views bulk operations (VBO) in various parts of its UI.
Parameters
$sid: Signup ID to load.
Return value
Fully loaded $signup object corresponding to the given ID.
1 call to signup_load_signup()
- signup_menu_load in ./
signup.module - Menu loader callback to load a project node.
1 string reference to 'signup_load_signup'
- signup_views_bulk_operations_object_info in ./
signup.module - Implementation of hook_views_bulk_operations_object_info().
File
- ./
signup.module, line 972 - The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…
Code
function signup_load_signup($sid) {
$signup = db_fetch_object(db_query("SELECT sl.*, n.title, u.name, u.mail FROM {signup_log} sl INNER JOIN {node} n ON sl.nid = n.nid INNER JOIN {users} u ON sl.uid = u.uid WHERE sl.sid = %d", $sid));
if (!empty($signup)) {
// This label is escaped by VBO, so it needs to be plain text, not HTML.
$signup->label = t("!user signup for '!title'", array(
'!user' => $signup->name,
'!title' => $signup->title,
));
}
return $signup;
}