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

process_resource_data_joins_values()

Description

Process resource data_joins (ie fieldX columns) values

Parameters

ColumnTypeDefaultDescription
$resource array A resource table record
$resource_table_joins: array array_mapprefix_value'field'
$fieldX_translated_csv;
$size: string 'T' . $resource_type; return checkperm$Trt || checkperm"{$Trt}_{$size}"; } /** * Revert primary resource file based on log entry data * * @param int $resource Resource ID * @param array $logentry Log data from get_resource_log. Requires rse_version plugin to be enabled * @param bool $createpreviews Create previews? * * @return bool * */ function revert_resource_file$resource
$logentry
$createpreviews true
$resource_table_joins array List of refs for the resource table data_joins. {@see get_resource_table_joins()}

Return

array Returns the resource record with updated data_joins (ie fieldX columns) values

Location

include/resource_functions.php lines 9373 to 9379

Definition

 
function process_resource_data_joins_values(array $resource, array $resource_table_joins): array
    {
    
$fieldX_column_names array_map(prefix_value('field'), $resource_table_joins);
    
$fieldX_data array_intersect_key($resourcearray_flip($fieldX_column_names));
    
$fieldX_translated_csv array_map('data_joins_field_value_translate_and_csv'$fieldX_data);
    return 
array_merge($resource$fieldX_translated_csv);
    }

This article was last updated 13th December 2024 20:35 Europe/London time based on the source file dated 13th December 2024 14:45 Europe/London time.