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

relate_all_resources()

Description

Relate all resources in the passed array with each other

Parameters

ColumnTypeDefaultDescription
$related array [] Array of resource IDs

Return

boolean

Location

include/resource_functions.php lines 9050 to 9064

Definition

 
function relate_all_resources(array $related = [])
    {
    
$error false;
    
array_filter($related,"is_int_loose");
    foreach(
$related as $ref)
        {
        
$other_refs array_diff($related,array($ref));
        
$success update_related_resource($ref,$other_refs,true);
        if(!
$success)
            {
            
$error true;
            }
        }
    return !
$error;
    }

This article was last updated 27th April 2024 09:05 Europe/London time based on the source file dated 26th April 2024 11:50 Europe/London time.