Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource 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 1884 to 1911

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 19th March 2024 01:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.