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

Class GravityView_Recent_Entries_Widget. More...

Inheritance diagram for GravityView_Recent_Entries_Widget:

Public Member Functions

 __construct ()
 
 admin_enqueue_scripts ()
 Enable the merge tags functionality. More...
 
 ajax_get_view_merge_tag_data ()
 When the widget View is changed, update the Merge Tag data. More...
 
 form ( $instance)
 
 update ( $new_instance, $old_instance)
 
 widget ( $args, $instance)
 

Private Member Functions

 get_entries ( $instance, $form_id)
 Get the entries that will be shown in the current widget. More...
 
 initialize ()
 

Detailed Description

Class GravityView_Recent_Entries_Widget.

Since
1.6

Definition at line 10 of file class-gravityview-recent-entries-widget.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 13 of file class-gravityview-recent-entries-widget.php.

References $name, and initialize().

Member Function Documentation

◆ admin_enqueue_scripts()

admin_enqueue_scripts ( )

Enable the merge tags functionality.

Since
1.6

Definition at line 68 of file class-gravityview-recent-entries-widget.php.

References GRAVITYVIEW_FILE, and GV_PLUGIN_VERSION.

◆ ajax_get_view_merge_tag_data()

ajax_get_view_merge_tag_data ( )

When the widget View is changed, update the Merge Tag data.

Since
1.6

Definition at line 39 of file class-gravityview-recent-entries-widget.php.

References GV\$form, $form_id, $output, and gravityview_get_form_id().

◆ form()

form (   $instance)
Since
1.6
See also
WP_Widget::form()

Display errors generated for invalid embed IDs

See also
GravityView_View_Data::is_valid_embed_id

Display errors generated for invalid embed IDs

See also
GravityView_View_Data::is_valid_embed_id
Runs Actions:
gravityview_recent_entries_widget_form Displayed at the bottom of the Recent Entries widget admin form
Parameters
GravityView_Recent_Entries_Widget$thisWP_Widget object
array$instanceCurrent widget instance

Definition at line 246 of file class-gravityview-recent-entries-widget.php.

References $args, $title, and GravityView_Admin\no_views_text().

◆ get_entries()

get_entries (   $instance,
  $form_id 
)
private

Get the entries that will be shown in the current widget.

Parameters
array$instanceSettings for the current widget
string$form_idForm ID int, as string
Returns
array|GV[] $entries Multidimensional array of Gravity Forms entries or GravityView Entry objects

Definition at line 185 of file class-gravityview-recent-entries-widget.php.

References $entries, and View\by_id().

Referenced by widget().

◆ initialize()

initialize ( )
private

Definition at line 26 of file class-gravityview-recent-entries-widget.php.

Referenced by __construct().

◆ update()

update (   $new_instance,
  $old_instance 
)
Since
1.6
See also
WP_Widget::update()
Parameters
array$new_instanceWidget form settings after update
array$old_instanceWidget form settings before update
Returns
array Calculated widget settings after processing

Modify the updated instance. This will allow for validating any added instance settings externally.

Parameters
array$instanceCalculated widget settings after processing
array$new_instanceWidget form settings after update
array$old_instanceWidget form settings before update

Definition at line 207 of file class-gravityview-recent-entries-widget.php.

References GravityView_View_Data\is_valid_embed_id().

◆ widget()

widget (   $args,
  $instance 
)
Since
1.6
See also
WP_Widget::widget()
Parameters
array$argsDisplay arguments including before_title, after_title, before_widget, and after_widget.
array$instanceThe settings for the particular instance of the widget.
Runs Actions:
gravityview/widget/recent-entries/before_widget Before recent entries are displayed in the WordPress widget
Parameters
array$argsDisplay arguments including before_title, after_title, before_widget, and after_widget.
array$instanceThe settings for the particular instance of the widget.
Runs Actions:
gravityview/widget/recent-entries/after_widget After recent entries are displayed in the WordPress widget
Parameters
array$argsDisplay arguments including before_title, after_title, before_widget, and after_widget.
array$instanceThe settings for the particular instance of the widget.

Definition at line 93 of file class-gravityview-recent-entries-widget.php.

References $args, $entries, GV\$form, $form_id, $output, $title, get_entries(), gravityview_get_form(), and gravityview_get_form_id().


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