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 3844 to 3859

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 22nd May 2024 15:05 Europe/London time based on the source file dated 20th May 2024 14:55 Europe/London time.