function commons_follow_get_nids in Drupal Commons 7.3
Get all node IDs relevant to what the user ordered.
Parameters
$account: The user being checked. Defaults to the current user.
$options: Array. Includes options to alter the query. Options available are used within the hook implementations.
Return value
Array of node IDs.
1 call to commons_follow_get_nids()
- commons_follow_plugin_argument_default_node::get_argument in modules/
commons/ commons_follow/ includes/ views/ handlers/ commons_follow_plugin_argument_default_node.inc - Get the default argument.
File
- modules/
commons/ commons_follow/ commons_follow.module, line 199
Code
function commons_follow_get_nids($account = NULL, $options = array()) {
if (empty($account)) {
global $user;
$account = clone $user;
}
$nids = array();
// We don't use module_invoke_all() is we want to retain the array keys,
// which are the user IDs.
foreach (module_implements('commons_follow_get_nids') as $module) {
$function = $module . '_commons_follow_get_nids';
$result = $function($account, $options);
if (empty($result)) {
continue;
}
foreach ($result as $nid) {
$nids[$nid] = $nid;
}
}
return $nids;
}