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

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 9167 to 9181

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 8th December 2024 20:35 Europe/London time based on the source file dated 6th December 2024 14:05 Europe/London time.