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_all_resource_types()

Description

Returns all resources types

No permissions are checked or applied, do not expose this function to the API

Parameters

This function accepts no parameters.

Return

array Array of resource types ordered by 'order_by' then 'ref'

Location

include/resource_functions.php lines 3892 to 3907

Definition

 
function get_all_resource_types()
    {
    return 
ps_query("
         SELECT " 
columns_in("resource_type","rt") . ",
                t.name AS tab_name,
                GROUP_CONCAT(rtfrt.resource_type_field ORDER BY rtfrt.resource_type_field) AS resource_type_field
           FROM resource_type rt
      LEFT JOIN tab t ON t.ref=rt.tab
      LEFT JOIN resource_type_field_resource_type rtfrt
             ON rtfrt.resource_type=rt.ref
       GROUP BY rt.ref
       ORDER BY order_by,
                rt.ref"
,
        [],
        
"schema");
    }

This article was last updated 17th November 2024 15:35 Europe/London time based on the source file dated 15th November 2024 18:30 Europe/London time.