Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

get_resource_type_field()

Description

Returns field data from resource_type_field for the given field

Parameters

ColumnTypeDefaultDescription
$field integer Resource type field ID

Return

boolean|array

Location

include/resource_functions.php lines 2648 to 2711

Definition

 
function get_resource_type_field($field)
    {
    
$field escape_check($field);
    
$rtf_query="SELECT ref,
                name,
                title,
                type,
                order_by,
                keywords_index,
                partial_index,
                resource_type,
                resource_column,
                display_field,
                use_for_similar,
                iptc_equiv,
                display_template,
                tab_name,
                required,
                smart_theme_name,
                exiftool_field,
                advanced_search,
                simple_search,
                help_text,
                display_as_dropdown,
                external_user_access,
                autocomplete_macro,
                hide_when_uploading,
                hide_when_restricted,
                value_filter,
                exiftool_filter,
                omit_when_copying,
                tooltip_text,
                regexp_filter,
                sync_field,
                display_condition,
                onchange_macro,
                field_constraint,
                linked_data_field,
                automatic_nodes_ordering,
                fits_field,
                personal_data,
                include_in_csv_export,
                browse_bar,
                active,
                full_width,
                read_only" 
hook('add_resource_type_field_column') . "
           FROM resource_type_field
          WHERE ref = '
{$field}'
    "
;
    
$modified_rtf_query=hook('modify_rtf_query','', array($field$rtf_query));
    if(
$modified_rtf_query!==false){
        
$rtf_query=$modified_rtf_query;
    }
    
$return sql_query($rtf_query"schema");

    if(
== count($return))
        {
        return 
false;
        }
    else
        {
        return 
$return[0];
        }
    }

This article was last updated 30th November 2020 10:35 Europe/London time based on the source file dated 27th November 2020 14:50 Europe/London time.