function _nodehierarchy_get_children_count_plid in Node Hierarchy 7.2
Same name and namespace in other branches
- 6.3 nodehierarchy.module \_nodehierarchy_get_children_count_plid()
- 6.2 nodehierarchy.module \_nodehierarchy_get_children_count_plid()
Count the children of the given menu link.
2 calls to _nodehierarchy_get_children_count_plid()
- _nodehierarchy_get_children_count in ./
nodehierarchy.module - Count the children of the given node.
- _nodehierarchy_save_node in ./
nodehierarchy.module - Do the actual insertion or update. No permissions checking is done here.
File
- ./
nodehierarchy.module, line 1163 - A module to make nodes hierarchical.
Code
function _nodehierarchy_get_children_count_plid($plid) {
if ($plid) {
$out = db_query("SELECT count(mlid) as children_count FROM {menu_links} WHERE module = :module AND plid = :plid AND router_path = :router_path", array(
':module' => 'nodehierarchy',
':plid' => $plid,
':router_path' => 'node/%',
))
->fetchField();
return $out;
}
return 0;
}