GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Static Public Member Functions
Utils Class Reference

If this file is called directly, abort. More...

Static Public Member Functions

static _GET ( $name, $default=null)
 Grab a value from the _GET superglobal or default. More...
 
static _POST ( $name, $default=null)
 Grab a value from the _POST superglobal or default. More...
 
static _REQUEST ( $name, $default=null)
 Grab a value from the _REQUEST superglobal or default. More...
 
static _return ( $value)
 Return a value by call. More...
 
static _SERVER ( $name, $default=null)
 Grab a value from the _SERVER superglobal or default. More...
 
static get ( $array, $key, $default=null)
 Grab a value from an array or an object or default. More...
 
static gf_query_debug ( $query)
 Output an associative array represenation of the query parameters. More...
 
static gf_query_strip_condition_column_aliases ( $condition)
 Strips aliases in columns. More...
 
static strip_excel_formulas ( $value)
 Sanitizes Excel formulas inside CSV output. More...
 

Detailed Description

If this file is called directly, abort.

Generic utilities.

Definition at line 12 of file class-gv-utils.php.

Member Function Documentation

◆ _GET()

static _GET (   $name,
  $default = null 
)
static

◆ _POST()

static _POST (   $name,
  $default = null 
)
static

Grab a value from the _POST superglobal or default.

Parameters
string$nameThe key name (will be prefixed).
mixed$defaultThe default value if not found (Default: null)
Returns
mixed The value or $default if not found.

Definition at line 33 of file class-gv-utils.php.

References $name.

Referenced by GravityView_Widget_Gravity_Forms\__construct(), GravityView_Entry_Approval\ajax_update_approved(), GravityView_API\directory_link(), GravityView_Bulk_Actions\get_gv_bulk_action(), GravityView_Field\is_choice_value_enabled(), GravityView_Edit_Entry_Render\maybe_print_message(), and GravityView_Change_Entry_Creator\update_entry_creator().

◆ _REQUEST()

static _REQUEST (   $name,
  $default = null 
)
static

Grab a value from the _REQUEST superglobal or default.

Parameters
string$nameThe key name (will be prefixed).
mixed$defaultThe default value if not found (Default: null)
Returns
mixed The value or $default if not found.

Definition at line 45 of file class-gv-utils.php.

References $name.

Referenced by GravityView_Plugin_Hooks_Gravity_Forms_Chained_Selects\get_field_values(), and GravityView_Widget_Search\rgget_or_rgpost().

◆ _return()

static _return (   $value)
static

Return a value by call.

Use for quick hook callback returns and whatnot.

Definition at line 131 of file class-gv-utils.php.

References $value.

◆ _SERVER()

static _SERVER (   $name,
  $default = null 
)
static

Grab a value from the _SERVER superglobal or default.

Parameters
string$nameThe key name (will be prefixed).
mixed$defaultThe default value if not found (Default: null)
Returns
mixed The value or $default if not found.

Definition at line 57 of file class-gv-utils.php.

References $name.

Referenced by GravityView_Duplicate_Entry\duplicate_entry().

◆ get()

static get (   $array,
  $key,
  $default = null 
)
static

Grab a value from an array or an object or default.

Supports nested arrays, objects via / key delimiters.

Parameters
array | object | mixed$arrayThe array (or object). If not array or object, returns $default.
string$keyThe key.
mixed$defaultThe default value. Default: null
Returns
mixed The value or $default if not found.

Try direct key.

Try subkeys after split.

Definition at line 72 of file class-gv-utils.php.

Referenced by GravityView_Render_Settings\_sort_by_priority(), GravityView_Change_Entry_Creator\add_select(), GravityView_Template\assign_field_options(), gvlogic\authorized(), gvlogic\callback(), GravityView_Field_Date\date_display(), GravityView_Plugin_Hooks_Gravity_Forms_Signature\edit_entry_field_input(), GVCommon\entry_has_transaction_data(), GravityView_Lightbox_Provider_FancyBox\fileupload_link_atts(), GravityView_Widget_Search\filter_entries(), GVCommon\format_date(), GravityView_Field_Payment_Amount\get_content(), GravityView_Render_Settings\get_default_field_options(), GravityView_Field_Gravatar\get_email(), GravityView_Field_Notes\get_email_footer(), View\get_entries(), GravityView_Field_Post_Content\get_field_input(), GVCommon\get_field_label(), GravityView_Field_FileUpload\get_files_array(), GravityView_Widget_Search\get_operator(), GravityView_Field_Is_Approved\get_output(), GravityView_frontend\get_search_criteria_paging(), GravityView_Widget_Search\get_search_filter_details(), GravityView_Plugin_Hooks_Gravity_Flow\get_status_options(), Views_Route\get_sub_item(), gravityview_field_output(), GV\Mocks\GravityView_frontend_get_view_entries(), GravityView_Field_Address\input_types(), Admin_Request\is_admin(), Request\is_entry(), GravityView_Support_Port\maybe_add_article_to_tooltip(), GravityView_Plugin_Hooks_Gravity_Forms_Partial_Entries\maybe_save_partial_entry(), GravityView_Widget_Search\maybe_sieve_filter_choices(), GravityView_Theme_Hooks_SiteOrigin\merge_content_meta_keys(), gravityview\parse_and_sanitize_atts(), GravityView_frontend\parse_query_fix_frontpage(), Views_Route\prepare_entry_for_response(), GravityView_Render_Settings\render_field_options(), GravityView_Widget_Gravity_Forms\render_frontend(), GravityView_FieldType_number\render_input(), GravityView_FieldType_text\render_input(), GravityView_Merge_Tags\replace_current_post(), GravityView_Field_Date_Created\replace_merge_tag(), GravityView_Field_Payment_Amount\replace_merge_tag(), GravityView_Field_Is_Fulfilled\replace_merge_tag(), GravityView_Field_Sequence\replace_merge_tag(), GravityView_Edit_Entry_User_Registration\restore_display_name(), GravityView_Field_Address\search_field_filter(), GravityView_Field_Post_Category\set_post_categories(), GravityView_Edit_Entry_Render\setup_vars(), GravityView_Field_Custom\show_field_in_edit_entry(), GravityView_Edit_Entry_Render\unselect_default_values(), GravityView_Edit_Entry_Render\update_post_image(), and GravityView_Edit_Entry_User_Registration\update_user().

◆ gf_query_debug()

static gf_query_debug (   $query)
static

Output an associative array represenation of the query parameters.

Definition at line 145 of file class-gv-utils.php.

◆ gf_query_strip_condition_column_aliases()

static gf_query_strip_condition_column_aliases (   $condition)
static

Strips aliases in columns.

See also
https://github.com/gravityview/GravityView/issues/1308#issuecomment-617075190

Definition at line 165 of file class-gv-utils.php.

◆ strip_excel_formulas()

static strip_excel_formulas (   $value)
static

Sanitizes Excel formulas inside CSV output.

Definition at line 110 of file class-gv-utils.php.

References $value.


The documentation for this class was generated from the following file: