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

Static Public Member Functions

static get_cap_choices ($template_id= '', $field_id= '', $context= '', $input_type= '')
 Get capabilities options for GravityView. More...
 
static get_default_field_options ($field_type, $template_id, $field_id, $context, $input_type)
 Get the default options for a standard field. More...
 
static load_type_class ($field=NULL)
 Given a field type calculates the php class. More...
 
static render_checkbox_option ($name= '', $id= '', $current= '')
 
static render_field_options ($field_type, $template_id, $field_id, $field_label, $area, $input_type=NULL, $uniqid= '', $current= '', $context= 'single', $item=array())
 Render Field Options html (shown through a dialog box) More...
 
static render_select_option ($name= '', $id= '', $choices, $current= '')
 Render the HTML for a select box to be used on the field & widgets options. More...
 
static render_text_option ($name= '', $id= '', $current= '', $add_merge_tags=NULL, $args=array())
 
static render_textarea_option ($name= '', $id= '', $current= '', $add_merge_tags=NULL, $args=array())
 

Detailed Description

Definition at line 14 of file class.render.settings.php.

Member Function Documentation

static get_cap_choices (   $template_id = '',
  $field_id = '',
  $context = '',
  $input_type = '' 
)
static

Get capabilities options for GravityView.

Parameters are only to pass to the filter.

Parameters
string$template_idOptional. View slug
string$field_idOptional. GF Field ID - Example: 3, 5.2, entry_link, created_by
string$contextOptional. What context are we in? Example: single or directory
string$input_typeOptional. (textarea, list, select, etc.)
Returns
array Associative array, with the key being the capability and the value being the label shown.
Runs Filter:
gravityview_field_visibility_caps Modify the capabilities shown in the field dropdown
See also
http://docs.gravityview.co/article/96-how-to-modify-capabilities-shown-in-the-field-only-visible-to-dropdown
Since
1.0.1
Parameters
array$select_cap_choicesAssociative rray of role slugs with labels ( manage_options => Administrator )
string$template_idOptional. View slug
string$field_idOptional. GF Field ID - Example: 3, 5.2, entry_link, created_by
string$contextOptional. What context are we in? Example: single or directory
string$input_typeOptional. (textarea, list, select, etc.)

Definition at line 114 of file class.render.settings.php.

References $field_id.

Referenced by GravityView_Delete_Entry\delete_link_field_options(), and GravityView_Edit_Entry_Admin\field_options().

static get_default_field_options (   $field_type,
  $template_id,
  $field_id,
  $context,
  $input_type 
)
static

Get the default options for a standard field.

Parameters
string$field_typeType of field options to render (field or widget)
string$template_idTable slug
float$field_idGF Field ID - Example: 3, 5.2, entry_link, created_by
string$contextWhat context are we in? Example: single or directory
string$input_type(textarea, list, select, etc.)
Returns
array Array of field options with label, value, type, default keys
Runs Filter:
gravityview_template_{$field_type}_options Filter the field options by field type. Filter names: gravityview_template_field_options and gravityview_template_widget_options
Parameters
[in,out]arrayArray of field options with label, value, type, default keys
[in]string$template_idTable slug
[in]float$field_idGF Field ID - Example: 3, 5.2, entry_link, created_by
[in]string$contextWhat context are we in? Example: single or directory
[in]string$input_type(textarea, list, select, etc.)
Runs Filter:
gravityview_template_{$input_type}_options Filter the field options by input type ($input_type examples: textarea, list, select, etc.)
Parameters
[in,out]arrayArray of field options with label, value, type, default keys
[in]string$template_idTable slug
[in]float$field_idGF Field ID - Example: 3, 5.2, entry_link, created_by
[in]string$contextWhat context are we in? Example: single or directory
[in]string$input_type(textarea, list, select, etc.)

Definition at line 26 of file class.render.settings.php.

References $field_id.

static load_type_class (   $field = NULL)
static

Given a field type calculates the php class.

If not found try to load it.

Parameters
array$field
Returns
string type class name
Runs Filter:
gravityview/setting/class/{field_type}
Parameters
string$class_suffixfield class suffix; GravityView_FieldType_{$class_suffix}
array$fieldfield data
Runs Filter:
gravityview/setting/class_file/{field_type}
Parameters
string$field_type_include_pathfield class file path
array$fieldfield data

Definition at line 367 of file class.render.settings.php.

References $field, and GRAVITYVIEW_DIR.

static render_checkbox_option (   $name = '',
  $id = '',
  $current = '' 
)
static
Parameters
string$name,nameattribute
string$currentcurrent value
Returns
string html tags

Definition at line 411 of file class.render.settings.php.

References $name, and $output.

static render_field_options (   $field_type,
  $template_id,
  $field_id,
  $field_label,
  $area,
  $input_type = NULL,
  $uniqid = '',
  $current = '',
  $context = 'single',
  $item = array() 
)
static

Render Field Options html (shown through a dialog box)

See also
GravityView_Ajax::get_field_options
GravityView_Admin_Views::render_active_areas

public

Parameters
string$field_typefield / widget
string$template_id
string$field_id
string$field_label
string$area
string$uniqid(default: '')
string$current(default: '')
string$context(default: 'single')
array$itemField or widget array that's being rendered
Returns
string HTML of dialog box
Since
1.8

Definition at line 164 of file class.render.settings.php.

References $current_settings, $field_id, $name, $output, $value, and GravityView_View_Data\get_default_arg().

Referenced by GravityView_Ajax\get_field_options(), and GravityView_Admin_Views\render_active_areas().

static render_select_option (   $name = '',
  $id = '',
  $choices,
  $current = '' 
)
static

Render the HTML for a select box to be used on the field & widgets options.

Parameters
string$name[name attribute]
array$choices[select options]
string$current[current value]
Returns
string [html tags]

Definition at line 494 of file class.render.settings.php.

References $label, $name, $output, and $value.

static render_text_option (   $name = '',
  $id = '',
  $current = '',
  $add_merge_tags = NULL,
  $args = array() 
)
static
Parameters
string$nameUnique name of the field. Exampe: fields[directory_list-title][5374ff6ab128b][custom_label]
string$current[current value]
string$add_merge_tagsAdd merge tags to the input?
array$argsField settings, including class key for CSS class
Returns
string [html tags]

Definition at line 431 of file class.render.settings.php.

References $class, and $name.

static render_textarea_option (   $name = '',
  $id = '',
  $current = '',
  $add_merge_tags = NULL,
  $args = array() 
)
static
Parameters
string$nameUnique name of the field. Exampe: fields[directory_list-title][5374ff6ab128b][custom_label]
string$current[current value]
string | boolean$add_merge_tagsAdd merge tags to the input?
array$argsField settings, including class key for CSS class
Returns
string [html tags]

Definition at line 463 of file class.render.settings.php.

References $class, and $name.


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