Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

cattree_node_creator()

Description

Helper function for building node entry arrays for ordering

Parameters

ColumnTypeDefaultDescription
$ref int Node id
$resource_type_field int Category tree field id
$name string Node name
$parent int Parent node id
$order_by int Node order by
$resource int Resource id
$children array Array of child node ids
$active: int > $ref
'resource_type_field' > string $node['resource_type_field']
'name' > string $node['name']
'parent' > string $node['parent']
'order_by' > string $node['order_by']
'resource' > string $node['resource']
'children' > $children
'active' > int $node['active']
];
$active int Node active state (0 or 1)

Return

array

Location

include/node_functions.php lines 2186 to 2197

Definition

 
function cattree_node_creator($ref$resource_type_field$name$parent$order_by$resource$childrenint $active): array {
    return [
        
'ref' => $ref,
        
'resource_type_field' => $resource_type_field,
        
'name' => $name,
        
'parent' => $parent,
        
'order_by' => $order_by,
        
'resource' => $resource,
        
'children' => $children,
        
'active' => $active,
    ];
}

This article was last updated 25th April 2024 08:05 Europe/London time based on the source file dated 15th April 2024 11:30 Europe/London time.