Collections functions
General functions
Render functions
Theme permission 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 2822 to 2881

Definition

 
function get_resource_type_field($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,
                tab,
                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 = ?
    "
;
    
$return ps_query($rtf_query, array("i",$field), "schema");

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

This article was last updated 30th September 2022 17:05 Europe/London time based on the source file dated 30th September 2022 14:20 Europe/London time.