Collections functions
General 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 3773 to 3789

Definition

 
function get_all_resource_types()
    {
    
$r=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");
    return 
$r;
    }

This article was last updated 6th December 2023 20:35 Europe/London time based on the source file dated 30th November 2023 17:05 Europe/London time.