GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
GravityView_Admin_View_Item Class Reference

A field or widget in GravityView view configuration. More...

Inheritance diagram for GravityView_Admin_View_Item:
GravityView_Admin_View_Field GravityView_Admin_View_Widget

Public Member Functions

 __construct ( $title='', $item_id='', $item=array(), $settings=array(), $form_id=null, $form=array())
 
 __toString ()
 When echoing this class, print the HTML output. More...
 
 getOutput ()
 Generate HTML for field or a widget modal. More...
 

Protected Member Functions

 additional_info ()
 Overridden by child classes. More...
 
 get_item_info ( $html=true)
 Generate the output for a field based on the additional_info() output. More...
 

Protected Attributes

 $form
 
 $form_id
 
 $id
 
 $item
 
 $label_type
 
 $settings
 
 $subtitle
 
 $title
 

Private Member Functions

 get_indicator_icons ()
 Returns array of item icons used to represent field settings state. More...
 

Detailed Description

A field or widget in GravityView view configuration.

Definition at line 10 of file class-gravityview-admin-view-item.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $title = '',
  $item_id = '',
  $item = array(),
  $settings = array(),
  $form_id = null,
  $form = array() 
)

Definition at line 52 of file class-gravityview-admin-view-item.php.

References $form, $form_id, $item, $settings, and $title.

Member Function Documentation

◆ __toString()

__toString ( )

When echoing this class, print the HTML output.

Returns
string HTML output of the class

Definition at line 92 of file class-gravityview-admin-view-item.php.

References getOutput().

◆ additional_info()

additional_info ( )
protected

Overridden by child classes.

Returns
array Array of content with arrays for each item. Those arrays have value, label and (optional) class keys

Definition at line 101 of file class-gravityview-admin-view-item.php.

Referenced by get_item_info().

◆ get_indicator_icons()

get_indicator_icons ( )
private

Returns array of item icons used to represent field settings state.

Has gravityview/admin/indicator_icons filter for other components to modify displayed icons.

Since
2.9.5
Returns
string HTML output of icons
Runs Filter:
gravityview/admin/indicator_icons Modify the icon output to add additional indicator icons

Definition at line 259 of file class-gravityview-admin-view-item.php.

◆ get_item_info()

get_item_info (   $html = true)
protected

Generate the output for a field based on the additional_info() output.

See also
GravityView_Admin_View_Item::additional_info()
Parameters
boolean$htmlDisplay HTML output? If yes, output is wrapped in spans. If no, plaintext.
Returns
string|null If empty, return null. Otherwise, return output HTML/text.
Runs Filter:
gravityview_admin_label_item_info Tap in to modify the field information displayed next to an item
Parameters
array$field_info_itemsAdditional information to display in a field
GravityView_Admin_View_Field$thisField shown in the admin

Definition at line 112 of file class-gravityview-admin-view-item.php.

References $class, $item, $output, and additional_info().

◆ getOutput()

getOutput ( )

Generate HTML for field or a widget modal.

Returns
string

Definition at line 156 of file class-gravityview-admin-view-item.php.

References $form, $label, $title, GVCommon\get_form(), and gravityview_get_field().

Referenced by __toString().

Field Documentation

◆ $form

$form
protected

Definition at line 50 of file class-gravityview-admin-view-item.php.

Referenced by __construct(), and getOutput().

◆ $form_id

$form_id
protected

Definition at line 45 of file class-gravityview-admin-view-item.php.

Referenced by __construct().

◆ $id

$id
protected

Definition at line 20 of file class-gravityview-admin-view-item.php.

◆ $item

$item
protected

Definition at line 35 of file class-gravityview-admin-view-item.php.

Referenced by __construct(), and get_item_info().

◆ $label_type

$label_type
protected

Definition at line 30 of file class-gravityview-admin-view-item.php.

◆ $settings

$settings
protected

Definition at line 40 of file class-gravityview-admin-view-item.php.

Referenced by __construct().

◆ $subtitle

$subtitle
protected

Definition at line 25 of file class-gravityview-admin-view-item.php.

◆ $title

$title
protected

Definition at line 15 of file class-gravityview-admin-view-item.php.

Referenced by __construct(), and getOutput().


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