Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 2214 to 2225

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 4th December 2024 08:35 Europe/London time based on the source file dated 28th November 2024 12:10 Europe/London time.