Collections functions
General functions
Render functions
Theme permission 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 8631 to 8645

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 26th September 2022 14:05 Europe/London time based on the source file dated 22nd September 2022 10:25 Europe/London time.