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

resolve_nodes_from_string()

Description

Function used to create a list of nodes found in a search string

IMPORTANT: use resolve_given_nodes() if you need to detect nodes based on
search string format (ie. @@253@@255 and/ or @@!260)

Parameters

ColumnTypeDefaultDescription
$string string

Return

array

Location

include/search_functions.php lines 2002 to 2029

Definition

 
function resolve_nodes_from_string($string)
    {
    if(!
is_string($string))
        {
        return array();
        }

    
$node_bucket     = array();
    
$node_bucket_not = array();
    
$return          = array();

    
resolve_given_nodes($string$node_bucket$node_bucket_not);

    foreach(
$node_bucket as $nodes)
        {
        foreach(
$nodes as $node)
            {
            
$return[] = $node;
            }
        }

    foreach(
$node_bucket_not as $node_not)
        {
        
$return[]="-".$node_not;
        }

    return 
$return;
    }

This article was last updated 12th December 2024 10:35 Europe/London time based on the source file dated 12th December 2024 10:30 Europe/London time.