Collections functions
General functions
Render functions
Theme permission functions
Resource functions

is_parent_node()

Description

Checks whether a node is parent to other nodes or not

Parameters

ColumnTypeDefaultDescription
$ref integer Node ref

Return

boolean

Location

include/node_functions.php lines 409 to 426

Definition

 
function is_parent_node($ref)
    {
    if(
is_null($ref))
        {
        return 
false;
        }

    
$query "SELECT exists (SELECT ref from node WHERE parent = ?) AS value;";
    
$parameters = array("i",$ref);
    
$parent_exists ps_value($query$parameters0);

    if(
$parent_exists 0)
        {
        return 
true;
        }

    return 
false;
    }

This article was last updated 29th May 2022 06:35 Europe/London time based on the source file dated 6th April 2022 16:35 Europe/London time.