function _views_bulk_operations_normalize_node_context in Views Bulk Operations (VBO) 6.3
Same name and namespace in other branches
- 6 views_bulk_operations.module \_views_bulk_operations_normalize_node_context()
Normalize function for node context.
See also
_trigger_normalize_node_context()
1 string reference to '_views_bulk_operations_normalize_node_context'
File
- ./
views_bulk_operations.module, line 1054 - Allows operations to be performed on items selected in a view.
Code
function _views_bulk_operations_normalize_node_context($type, $node) {
switch ($type) {
// If an action that works on comments is being called in a node context,
// the action is expecting a comment object. But we do not know which comment
// to give it. The first? The most recent? All of them? So comment actions
// in a node context are not supported.
// An action that works on users is being called in a node context.
// Load the user object of the node's author.
case 'user':
return user_load(array(
'uid' => $node->uid,
));
}
}