Collections functions
General functions
Render functions
Theme permission functions
Resource functions

get_editable_resource_sql()

Description

Return an SQL statement to find all editable resources in $actions_notify_states.

Parameters

This function accepts no parameters.

Return

string

Location

include/action_functions.php lines 116 to 132

Definition

 
function get_editable_resource_sql()
    {
    global 
$actions_notify_states$actions_resource_types_hide$default_display$list_display_fields$search_all_workflow_states;
    
$default_display    $list_display_fields;
    
$search_all_workflow_states false;
    
$rtypes=get_resource_types();
    
$searchable_restypes=implode(",",array_diff(array_column($rtypes,"ref"),explode(",",$actions_resource_types_hide)));

    
$editable_resource_query= new PreparedStatementQuery();  

    
# TODO Adjust return from do_search() after it is ported to return an object
    # FROM: $editable_resource_query->sql=do_search(
    # TO: $editable_resource_query=do_search(
    
$editable_resource_query->sql=do_search("",$searchable_restypes,'resourceid',$actions_notify_states,-1,'desc',false,0,false,false,'',false,false,false,true,true);

    return 
$editable_resource_query;
    }

This article was last updated 20th May 2022 09:05 Europe/London time based on the source file dated 9th March 2022 15:45 Europe/London time.