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_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 2918 to 2928

Definition

 
function get_resource_type_field($field)
{
    
$rtf_query "SELECT " columns_in("resource_type_field""rtf") . ", GROUP_CONCAT(rtfrt.resource_type) resource_types FROM resource_type_field rtf LEFT JOIN resource_type_field_resource_type rtfrt ON rtfrt.resource_type_field=rtf.ref WHERE rtf.ref = ? GROUP BY rtf.ref";
    
$return ps_query($rtf_query, array("i",$field), "schema");

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

This article was last updated 15th February 2025 20:35 Europe/London time based on the source file dated 14th February 2025 12:25 Europe/London time.