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

get_exiftool_fields()

Description

Returns a list of exiftool fields, which are basically fields with an 'exiftool field' set.

- Recommended NODE_NAME_STRING_SEPARATOR
- Defaults to comma for backwards compatibility

Parameters

ColumnTypeDefaultDescription
$resource_type integer
$option_separator string " String to separate the node options returned for fixed list fields
"
$skip_translation bool false Set to true to return the entire untranslated node value rather than the appropriate translation only.

Return

array

Location

include/resource_functions.php lines 4478 to 4510

Definition

 
function get_exiftool_fields($resource_typestring $option_separator ","bool $skip_translation false)
    {
    global 
$FIXED_LIST_FIELD_TYPES;
    
$return ps_query("
           SELECT f.ref,
                  f.type,
                  f.exiftool_field,
                  f.exiftool_filter,
                  f.name,
                  f.read_only
             FROM resource_type_field AS f
        LEFT JOIN resource_type_field_resource_type rtfrt ON f.ref=rtfrt.resource_type_field
            WHERE length(exiftool_field) > 0
              AND (rtfrt.resource_type = ? OR f.global=1)
         GROUP BY ref
         ORDER BY exiftool_field"
, array("i",$resource_type),"schema");
        

    
// Add options for fixed list fields
    
foreach($return as &$field)
        {
        if(
in_array($field["type"],$FIXED_LIST_FIELD_TYPES))
            {
            
$options get_field_options($field["ref"], false$skip_translation);
            
$field["options"] = implode($option_separator,$options);
            }
        else
            {
            
$field["options"] = "";
            }
        }
    return 
$return;
    }

This article was last updated 4th December 2024 08:35 Europe/London time based on the source file dated 28th November 2024 12:10 Europe/London time.