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

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

Public Member Functions

 __construct ( $entries=array(), $post_id=0, $form=array(), $link_format='', $after_link='', $context='', $template_context=null, $view_id=0)
 
 get_output ()
 Get the HTML output. More...
 
 output ()
 Echo the output generated by get_output() More...
 
 set_after_link ( $after_link)
 
 set_context ( $context)
 Set the context in which this entry list is being displayed. More...
 
 set_empty_message ( $empty_message)
 Set the message when there are no entries to display. More...
 
 set_item_tag ( $item_tag)
 
 set_link_format ( $link_format)
 
 set_post_id ( $post_id)
 
 set_skip_current_entry ( $skip_current_entry)
 
 set_wrapper_tag ( $wrapper_tag)
 

Data Fields

 $template_context
 
 $view_id = 0
 

Private Member Functions

 get_item_output ( $entry)
 Get the output for a specific entry. More...
 
 skip_entry ( $entry, $current_entry)
 Should the current entry be skipped while showing the list of entries? More...
 

Private Attributes

 $after_link = ''
 
 $context = ''
 
 $empty_message = ''
 
 $entries = array()
 
 $form = array()
 
 $item_tag = 'li'
 
 $link_format = ''
 
 $post_id = 0
 
 $skip_current_entry = true
 
 $wrapper_tag = 'ul'
 

Detailed Description

If this file is called directly, abort.

Generate linked list output for a list of entries.

Since
1.7.2

Definition at line 13 of file class-gravityview-entry-list.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $entries = array(),
  $post_id = 0,
  $form = array(),
  $link_format = '',
  $after_link = '',
  $context = '',
  $template_context = null,
  $view_id = 0 
)
Since
2.0 Added $template_context parameter
2.7.2 Added $view_id parameter
Parameters
array|GV

Definition at line 98 of file class-gravityview-entry-list.php.

References $after_link, $context, $entries, $form, $link_format, $post_id, $template_context, $view_id, and gv_no_results().

Member Function Documentation

◆ get_item_output()

get_item_output (   $entry)
private

Get the output for a specific entry.

Parameters
array$entryGF Entry array
Since
1.7.2

gravityview_get_link GravityView_API::entry_link GravityView_API::replace_variables

Returns
string HTML output for the entry
Runs Filter:
gravityview/entry-list/link The link to this other entry now.
Parameters
string$linkThe link.
array$entryThe entry.
\GravityView_Entry_List$thisThe current entry list object.
Runs Filter:
gravityview/entry-list/after-link Modify the content displayed after the entry link in an entry list
Since
1.7.2
Parameters
string$item_outputThe HTML output for the after_link content
array$entryGravity Forms entry array
GravityView_Entry_List$thisThe current class instance
Runs Filter:
gravityview/entry-list/item Modify each item's output in an entry list
Since
1.7.2
Parameters
string$item_outputThe HTML output for the item
array$entryGravity Forms entry array
GravityView_Entry_List$thisThe current class instance

Definition at line 272 of file class-gravityview-entry-list.php.

References $after_link, $entry, $link, GravityView_API\entry_link(), gravityview_get_link(), and GravityView_API\replace_variables().

Referenced by get_output().

◆ get_output()

get_output ( )

Get the HTML output.

Returns
string HTML output for entry list
Runs Filter:
gravityview/widget/recent-entries/output Modify the HTML of the Recent Entries widget output
Parameters
string$outputHTML to be displayed
GravityView_Entry_List$thisThe current class instance

Definition at line 190 of file class-gravityview-entry-list.php.

References $entry, $output, get_item_output(), GravityView_View\getInstance(), and skip_entry().

Referenced by output().

◆ output()

output ( )

Echo the output generated by get_output()

See also
get_output()
Returns
string HTML output for entry list

Definition at line 176 of file class-gravityview-entry-list.php.

References $output, and get_output().

◆ set_after_link()

set_after_link (   $after_link)
Parameters
string$after_link

Definition at line 134 of file class-gravityview-entry-list.php.

References $after_link.

◆ set_context()

set_context (   $context)

Set the context in which this entry list is being displayed.

Parameters
string$context

Definition at line 150 of file class-gravityview-entry-list.php.

References $context.

◆ set_empty_message()

set_empty_message (   $empty_message)

Set the message when there are no entries to display.

Parameters
string$empty_message

Definition at line 142 of file class-gravityview-entry-list.php.

References $empty_message.

◆ set_item_tag()

set_item_tag (   $item_tag)
Parameters
string$item_tag

Definition at line 165 of file class-gravityview-entry-list.php.

References $item_tag.

◆ set_link_format()

set_link_format (   $link_format)
Parameters
string$link_format

Definition at line 120 of file class-gravityview-entry-list.php.

References $link_format.

◆ set_post_id()

set_post_id (   $post_id)
Parameters
int$post_id

Definition at line 113 of file class-gravityview-entry-list.php.

References $post_id.

◆ set_skip_current_entry()

set_skip_current_entry (   $skip_current_entry)
Parameters
boolean$skip_current_entry

Definition at line 127 of file class-gravityview-entry-list.php.

References $skip_current_entry.

◆ set_wrapper_tag()

set_wrapper_tag (   $wrapper_tag)
Parameters
string$wrapper_tag

Definition at line 157 of file class-gravityview-entry-list.php.

References $wrapper_tag.

◆ skip_entry()

skip_entry (   $entry,
  $current_entry 
)
private

Should the current entry be skipped while showing the list of entries?

Parameters
array$entryGF Entry array
array | int$current_entryAs returned by GravityView_View::getCurrentEntry()
Returns
bool True: Skip entry; False: don't skip entry

Definition at line 240 of file class-gravityview-entry-list.php.

References $entry.

Referenced by get_output().

Field Documentation

◆ $after_link

$after_link = ''
private

Definition at line 39 of file class-gravityview-entry-list.php.

Referenced by __construct(), get_item_output(), and set_after_link().

◆ $context

$context = ''
private

Definition at line 57 of file class-gravityview-entry-list.php.

Referenced by __construct(), and set_context().

◆ $empty_message

$empty_message = ''
private

Definition at line 45 of file class-gravityview-entry-list.php.

Referenced by set_empty_message().

◆ $entries

$entries = array()
private

Definition at line 18 of file class-gravityview-entry-list.php.

Referenced by __construct().

◆ $form

$form = array()
private

Definition at line 28 of file class-gravityview-entry-list.php.

Referenced by __construct().

◆ $item_tag

$item_tag = 'li'
private

Definition at line 69 of file class-gravityview-entry-list.php.

Referenced by set_item_tag().

◆ $link_format

$link_format = ''
private

Definition at line 33 of file class-gravityview-entry-list.php.

Referenced by __construct(), and set_link_format().

◆ $post_id

$post_id = 0
private

Definition at line 23 of file class-gravityview-entry-list.php.

Referenced by __construct(), and set_post_id().

◆ $skip_current_entry

$skip_current_entry = true
private

Definition at line 51 of file class-gravityview-entry-list.php.

Referenced by set_skip_current_entry().

◆ $template_context

$template_context

Definition at line 77 of file class-gravityview-entry-list.php.

Referenced by __construct().

◆ $view_id

$view_id = 0

Definition at line 84 of file class-gravityview-entry-list.php.

Referenced by __construct().

◆ $wrapper_tag

$wrapper_tag = 'ul'
private

Definition at line 63 of file class-gravityview-entry-list.php.

Referenced by set_wrapper_tag().


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