Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource 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 3752 to 3767

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 29th March 2024 04:35 Europe/London time based on the source file dated 28th March 2024 11:35 Europe/London time.