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

node_name_comparator()

Description

Comparator function for uasort to allow sorting of node array by name


<0 means $n1 less than $n2
>0 means $n1 greater than $n2

Parameters

ColumnTypeDefaultDescription
$n1 array Node one to compare
$n2 string Node two to compare

Return

0 means $n1 equals $n2

Location

include/node_functions.php lines 1992 to 1995

Definition

 
function node_name_comparator($n1$n2)
    {
    return 
strcmp($n1["name"], $n2["name"]);
    }

This article was last updated 14th December 2024 18:35 Europe/London time based on the source file dated 11th December 2024 22:35 Europe/London time.