function calendar_get_node_link in Calendar 7
Same name and namespace in other branches
- 5.2 calendar.module \calendar_get_node_link()
- 6.2 calendar.module \calendar_get_node_link()
- 7.2 calendar.module \calendar_get_node_link()
Get the url for a calendar node.
Parameters
$node - a calendar node object:
$default - a default url to use when nothing specific is provided.:
1 call to calendar_get_node_link()
- calendar_build_nodes in ./
calendar.module - Take the array of items and alter it to an array of calendar nodes that the theme can handle.
File
- ./
calendar.module, line 415 - Adds calendar filtering and displays to Views.
Code
function calendar_get_node_link($node, $default = NULL) {
if (isset($node->url)) {
return url($node->url, array(
'absolute' => TRUE,
));
}
elseif (empty($node->remote) && is_numeric($node->nid)) {
return url("node/{$node->nid}", array(
'absolute' => TRUE,
));
}
elseif (!empty($default)) {
return url($default, array(
'absolute' => TRUE,
));
}
}