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

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 21st May 2024 21:35 Europe/London time based on the source file dated 20th May 2024 14:55 Europe/London time.